OSDN Git Service

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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 12:14:47 +0000 (21:14 +0900)
commitbc800e8b39bad60ccdb83be828da63af71ab87b3
treeb6ad410a3d3edd6f7befdde60d555c1f033c320c
parentcafb39600e7a73263122a0e2db052d691686378f
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 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>
drivers/net/ethernet/atheros/alx/main.c