alx: take rtnl before calling __alx_open from resume
authorSabrina Dubroca <sd@queasysnail.net>
Fri, 29 Jun 2018 15:51:26 +0000 (17:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:28:43 +0000 (14:28 +0200)
commitc62e2f087af11564ecbd1c0d08bbd84ac92afc07
tree5f1a875cea7623d890675d3f83f4fbc6f0e7b268
parent03bb9187754e2c82626dafcd3e12a137cbb952ce
alx: take rtnl before calling __alx_open from resume

[ Upstream commit bc800e8b39bad60ccdb83be828da63af71ab87b3 ]

The __alx_open function can be called from ndo_open, which is called
under RTNL, or from alx_resume, which isn't. Since commit d768319cd427,
we're calling the netif_set_real_num_{tx,rx}_queues functions, which
need to be called under RTNL.

This is similar to commit 0c2cc02e571a ("igb: Move the calls to set the
Tx and Rx queues into igb_open").

Fixes: d768319cd427 ("alx: enable multiple tx queues")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/atheros/alx/main.c