Skip to contentSkip to conversation

iavf: missing unlocks in iavf_watchdog_task()

PATCH In review Dan Carpenter 3 participants 6 messages Nov 10, 2021 – Dec 13, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iavf: missing unlocks in iavf_watchdog_task()

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

Fixes 898ef1cb1cb2 ("iavf: Combine init and watchdog state machines")
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +2 -2
index 847d67e32a54..b97f685a5cf8 100644
@@ -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;
 	}
 
Signature · 1 line
2.20.1
#1 lore raw

Dear Dan,

Thank you for your patch.

For the future, just a nit for the commit message summary. Could you make it a statement by adding a verb (in imperative mood) [1].

Quoted 1 line

iavf: Add missing unlocks in iavf_watchdog_task()

Kind regards,

Paul

[1]: https://chris.beams.io/posts/git-commit/

#2 lore raw
Quoted 10 lines · Paul Menzel

Dear Dan,

Thank you for your patch.

For the future, just a nit for the commit message summary. Could you make it a statement by adding a verb (in imperative mood) [1].

Quoted 1 line

iavf: Add missing unlocks in iavf_watchdog_task()

Imperative shmeritave.

When subsystems get taken over by fussy bureaucrats then I only send them bug reports instead of patches.

regards,
dan carpenter

#3 lore raw

Dear Dan,

Am 10.11.21 um 10:05 schrieb Dan Carpenter:

Quoted 7 lines · Paul Menzel
Quoted 6 lines

Thank you for your patch.

For the future, just a nit for the commit message summary. Could you make it a statement by adding a verb (in imperative mood) [1].

Quoted 6 lines
Quoted 1 line
Quoted 1 line

iavf: Add missing unlocks in iavf_watchdog_task()

Imperative shmeritave.

When subsystems get taken over by fussy bureaucrats then I only send them bug reports instead of patches.

It was just a wish as the standard commit messages follow that format, and any verb could be added. It?s not a requirement to my knowledge, and I do not have any authority anyway. Sorry about that, and thank you for your patches.

Kind regards,

Paul

#4 lore raw

Yep. Thanks. I know. I'm just trying to discourage those kind of review comments.

regards,
dan carpenter

Tested-by on v1 1/1
#5 lore raw
In reply to Dan Carpenter
Quoted 28 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dan Carpenter
Sent: ?roda, 10 listopada 2021 09:14
To: Brandeburg, Jesse <[email protected]>; Palczewski, Mateusz <[email protected]>
Cc: Pawlak, Jakub <[email protected]>; netdev at vger.kernel.org; kernel-janitors at vger.kernel.org; Jakub Kicinski <[email protected]>; intel- wired-lan at lists.osuosl.org; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH net] iavf: missing unlocks in iavf_watchdog_task()

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

Fixes 898ef1cb1cb2 ("iavf: Combine init and watchdog state machines")
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +0 -0
index 847d67e32a54..b97f685a5cf8 100644

drivers/net/ethernet/intel/iavf/iavf_main.c static void iavf_watchdog_task(struct work_struct · line 2012

Quoted 1 line
drivers/net/ethernet/intel/iavf/iavf_main.c +0 -0
@@ -2012,6 +2012,7 @@ static void iavf_watchdog_task(struct work_struct
 *work)