Skip to content

Commit

Permalink
igb: Fix a deadlock in igb_sriov_reinit
Browse files Browse the repository at this point in the history
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>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Jia-Ju Bai authored and Jeff Kirsher committed Aug 18, 2015
1 parent 5e5d494 commit 3eb14ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7413,6 +7413,7 @@ static int igb_resume(struct device *dev)

if (igb_init_interrupt_scheme(adapter, true)) {
dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
rtnl_unlock();
return -ENOMEM;
}

Expand Down

0 comments on commit 3eb14ea

Please sign in to comment.