netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] iavf: missing unlocks in iavf_watchdog_task()
@ 2021-11-10  8:13 Dan Carpenter
  2021-11-10  8:53 ` [Intel-wired-lan] " Paul Menzel
  2021-12-13 13:34 ` Jankowski, Konrad0
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-11-10  8:13 UTC (permalink / raw)
  To: Jesse Brandeburg, Mateusz Palczewski
  Cc: Tony Nguyen, David S. Miller, Jakub Kicinski, Jan Sokolowski,
	Jakub Pawlak, intel-wired-lan, netdev, kernel-janitors

This code was re-organized and there some unlocks missing now.

Fixes: 898ef1cb1cb2 ("iavf: Combine init and watchdog state machines")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 847d67e32a54..b97f685a5cf8 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2012,6 +2012,7 @@ static void iavf_watchdog_task(struct work_struct *work)
 		}
 		adapter->aq_required = 0;
 		adapter->current_op = VIRTCHNL_OP_UNKNOWN;
+		mutex_unlock(&adapter->crit_lock);
 		queue_delayed_work(iavf_wq,
 				   &adapter->watchdog_task,
 				   msecs_to_jiffies(10));
@@ -2042,9 +2043,8 @@ static void iavf_watchdog_task(struct work_struct *work)
 			iavf_detect_recover_hung(&adapter->vsi);
 		break;
 	case __IAVF_REMOVE:
-		mutex_unlock(&adapter->crit_lock);
-		return;
 	default:
+		mutex_unlock(&adapter->crit_lock);
 		return;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-13 13:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10  8:13 [PATCH net] iavf: missing unlocks in iavf_watchdog_task() Dan Carpenter
2021-11-10  8:53 ` [Intel-wired-lan] " Paul Menzel
2021-11-10  9:05   ` Dan Carpenter
2021-11-10  9:27     ` Paul Menzel
2021-11-10  9:36       ` Dan Carpenter
2021-12-13 13:34 ` Jankowski, Konrad0

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).