Skip to content

Commit bc800e8

Browse files
qsndavem330
authored andcommitted
alx: take rtnl before calling __alx_open from resume
The __alx_open function can be called from ndo_open, which is called under RTNL, or from alx_resume, which isn't. Since commit d768319, we're calling the netif_set_real_num_{tx,rx}_queues functions, which need to be called under RTNL. This is similar to commit 0c2cc02 ("igb: Move the calls to set the Tx and Rx queues into igb_open"). Fixes: d768319 ("alx: enable multiple tx queues") Signed-off-by: Sabrina Dubroca <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cafb396 commit bc800e8

File tree

1 file changed

+7
-1
lines changed
  • drivers/net/ethernet/atheros/alx

1 file changed

+7
-1
lines changed

drivers/net/ethernet/atheros/alx/main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1897,13 +1897,19 @@ static int alx_resume(struct device *dev)
18971897
struct pci_dev *pdev = to_pci_dev(dev);
18981898
struct alx_priv *alx = pci_get_drvdata(pdev);
18991899
struct alx_hw *hw = &alx->hw;
1900+
int err;
19001901

19011902
alx_reset_phy(hw);
19021903

19031904
if (!netif_running(alx->dev))
19041905
return 0;
19051906
netif_device_attach(alx->dev);
1906-
return __alx_open(alx, true);
1907+
1908+
rtnl_lock();
1909+
err = __alx_open(alx, true);
1910+
rtnl_unlock();
1911+
1912+
return err;
19071913
}
19081914

19091915
static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);

0 commit comments

Comments
 (0)