[PATCH net] iavf: missing unlocks in iavf_watchdog_task()

Subsystems: intel ethernet drivers, networking drivers, the rest

STALE1699d

6 messages, 3 authors, 2021-12-13 · open the first message on its own page

[PATCH net] iavf: missing unlocks in iavf_watchdog_task()

From: Dan Carpenter <hidden>
Date: 2021-11-10 08:14:14

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 <redacted>
---
 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

Re: [Intel-wired-lan] [PATCH net] iavf: missing unlocks in iavf_watchdog_task()

From: Paul Menzel <hidden>
Date: 2021-11-10 08:53:54

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].

 > iavf: Add missing unlocks in iavf_watchdog_task()


Kind regards,

Paul


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

Re: [Intel-wired-lan] [PATCH net] iavf: missing unlocks in iavf_watchdog_task()

From: Dan Carpenter <hidden>
Date: 2021-11-10 09:06:44

On Wed, Nov 10, 2021 at 09:53:50AM +0100, Paul Menzel wrote:
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
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

Re: [Intel-wired-lan] [PATCH net] iavf: missing unlocks in iavf_watchdog_task()

From: Paul Menzel <hidden>
Date: 2021-11-10 09:27:20

Dear Dan,


Am 10.11.21 um 10:05 schrieb Dan Carpenter:
On Wed, Nov 10, 2021 at 09:53:50AM +0100, Paul Menzel wrote:
quoted
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
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

Re: [Intel-wired-lan] [PATCH net] iavf: missing unlocks in iavf_watchdog_task()

From: Dan Carpenter <hidden>
Date: 2021-11-10 09:37:16

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

regards,
dan carpenter

RE: [Intel-wired-lan] [PATCH net] iavf: missing unlocks in iavf_watchdog_task()

From: Jankowski, Konrad0 <hidden>
Date: 2021-12-13 13:34:39

quoted hunk
-----Original Message-----
From: Intel-wired-lan <redacted> On Behalf Of
Dan Carpenter
Sent: środa, 10 listopada 2021 09:14
To: Brandeburg, Jesse <redacted>; Palczewski, Mateusz
[off-list ref]
Cc: Pawlak, Jakub <redacted>; netdev@vger.kernel.org;
kernel-janitors@vger.kernel.org; Jakub Kicinski [off-list ref]; intel-
wired-lan@lists.osuosl.org; David S. Miller [off-list ref]
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")
Signed-off-by: Dan Carpenter <redacted>
---
 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)
Tested-by: Konrad Jankowski <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help