All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ionic: unlock queue mutex in error path
@ 2020-07-29 17:52 Shannon Nelson
  2020-07-31  0:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Shannon Nelson @ 2020-07-29 17:52 UTC (permalink / raw)
  To: netdev, davem; +Cc: Shannon Nelson

On an error return, jump to the unlock at the end to be sure
to unlock the queue_lock mutex.

Fixes: 0925e9db4dc8 ("ionic: use mutex to protect queue operations")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 5fd31ba56937..e55d41546cff 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -2001,7 +2001,7 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
 		netif_device_detach(lif->netdev);
 		err = ionic_stop(lif->netdev);
 		if (err)
-			return err;
+			goto reset_out;
 	}
 
 	if (cb)
@@ -2011,6 +2011,8 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
 		err = ionic_open(lif->netdev);
 		netif_device_attach(lif->netdev);
 	}
+
+reset_out:
 	mutex_unlock(&lif->queue_lock);
 
 	return err;
-- 
2.17.1


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

* Re: [PATCH net] ionic: unlock queue mutex in error path
  2020-07-29 17:52 [PATCH net] ionic: unlock queue mutex in error path Shannon Nelson
@ 2020-07-31  0:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-31  0:37 UTC (permalink / raw)
  To: snelson; +Cc: netdev

From: Shannon Nelson <snelson@pensando.io>
Date: Wed, 29 Jul 2020 10:52:17 -0700

> On an error return, jump to the unlock at the end to be sure
> to unlock the queue_lock mutex.
> 
> Fixes: 0925e9db4dc8 ("ionic: use mutex to protect queue operations")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Shannon Nelson <snelson@pensando.io>

Applied.

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

end of thread, other threads:[~2020-07-31  0:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 17:52 [PATCH net] ionic: unlock queue mutex in error path Shannon Nelson
2020-07-31  0:37 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.