public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] net:switchdev: fix to release the lock before function return to avoid deadlock
       [not found] <1481018964-47554-1-git-send-email-feng.deng@cortina-access.com>
@ 2016-12-06 12:29 ` Jiri Pirko
  0 siblings, 0 replies; only message in thread
From: Jiri Pirko @ 2016-12-06 12:29 UTC (permalink / raw)
  To: Feng Deng; +Cc: davem, netdev, linux-kernel, cxdx2006

Tue, Dec 06, 2016 at 11:09:24AM CET, feng.deng@cortina-access.com wrote:
>before switchdev_deferred_dequeue() normal return,show release the lock,
>if not,maybe there will be deadlock sometimes
>
>Signed-off-by: Feng Deng <feng.deng@cortina-access.com>
>---
> net/switchdev/switchdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
>index 3b95fe9..c0a1ad4 100644
>--- a/net/switchdev/switchdev.c
>+++ b/net/switchdev/switchdev.c
>@@ -120,6 +120,7 @@ static struct switchdev_deferred_item *switchdev_deferred_dequeue(void)
> 	dfitem = list_first_entry(&deferred,
> 				  struct switchdev_deferred_item, list);
> 	list_del(&dfitem->list);
>+	spin_unlock_bh(&deferred_lock);
> unlock:
> 	spin_unlock_bh(&deferred_lock);

You are joking right?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-06 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1481018964-47554-1-git-send-email-feng.deng@cortina-access.com>
2016-12-06 12:29 ` [PATCH] net:switchdev: fix to release the lock before function return to avoid deadlock Jiri Pirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox