Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50d65d78 authored by Hannes Frederic Sowa's avatar Hannes Frederic Sowa Committed by David S. Miller
Browse files

qlcnic: protect qlicnic_attach_func with rtnl_lock



qlcnic_attach_func requires rtnl_lock to be held.

Cc: Dept-GELinuxNICDev@qlogic.com
Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b1f99a78
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3952,8 +3952,14 @@ static pci_ers_result_t qlcnic_82xx_io_error_detected(struct pci_dev *pdev,

static pci_ers_result_t qlcnic_82xx_io_slot_reset(struct pci_dev *pdev)
{
	return qlcnic_attach_func(pdev) ? PCI_ERS_RESULT_DISCONNECT :
	pci_ers_result_t res;

	rtnl_lock();
	res = qlcnic_attach_func(pdev) ? PCI_ERS_RESULT_DISCONNECT :
					 PCI_ERS_RESULT_RECOVERED;
	rtnl_unlock();

	return res;
}

static void qlcnic_82xx_io_resume(struct pci_dev *pdev)