linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] igb: Fix a deadlock in igb_sriov_reinit
@ 2015-08-03  3:36 Jia-Ju Bai
  2015-08-11  2:06 ` Brown, Aaron F
  0 siblings, 1 reply; 2+ messages in thread
From: Jia-Ju Bai @ 2015-08-03  3:36 UTC (permalink / raw)
  To: jeffrey.t.kirsher, jesse.brandeburg
  Cc: intel-wired-lan, netdev, linux-kernel, Jia-Ju Bai

When igb_init_interrupt_scheme in igb_sriov_reinit is failed, the lock 
acquired by rtnl_lock() is not released, which causes a deadlock.
This patch adds rtnl_unlock() in error handling to fix it.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 2f70a9b..311d1ca 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7539,6 +7539,7 @@ static int igb_sriov_reinit(struct pci_dev *dev)
 
 	if (igb_init_interrupt_scheme(adapter, true)) {
 		dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
+		rtnl_unlock();
 		return -ENOMEM;
 	}
 
-- 
1.7.9.5



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

* RE: [PATCH] igb: Fix a deadlock in igb_sriov_reinit
  2015-08-03  3:36 [PATCH] igb: Fix a deadlock in igb_sriov_reinit Jia-Ju Bai
@ 2015-08-11  2:06 ` Brown, Aaron F
  0 siblings, 0 replies; 2+ messages in thread
From: Brown, Aaron F @ 2015-08-11  2:06 UTC (permalink / raw)
  To: Jia-Ju Bai, Kirsher, Jeffrey T, Brandeburg, Jesse
  Cc: intel-wired-lan, netdev, linux-kernel

> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
> On Behalf Of Jia-Ju Bai
> Sent: Sunday, August 02, 2015 8:36 PM
> To: Kirsher, Jeffrey T; Brandeburg, Jesse
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Jia-Ju Bai
> Subject: [PATCH] igb: Fix a deadlock in igb_sriov_reinit
> 
> When igb_init_interrupt_scheme in igb_sriov_reinit is failed, the lock
> acquired by rtnl_lock() is not released, which causes a deadlock.
> This patch adds rtnl_unlock() in error handling to fix it.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c |    1 +
>  1 file changed, 1 insertion(+)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

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

end of thread, other threads:[~2015-08-11  2:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03  3:36 [PATCH] igb: Fix a deadlock in igb_sriov_reinit Jia-Ju Bai
2015-08-11  2:06 ` Brown, Aaron F

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