]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: restore RTNL locking around representor updates
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 3 Sep 2017 01:26:05 +0000 (18:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 04:22:05 +0000 (21:22 -0700)
commitcfe02f2bd60cbe0f74c41bc57238c278a2fec807
treefe886227eb05c3f4839c9bc4b072571d850e52f9
parent0d9026252c1ff4b5677aef314ba86aef84549f71
nfp: flower: restore RTNL locking around representor updates

When we moved to updating representors from a workqueue grabbing
the RTNL somehow got lost in the process.  Restore it, and make
sure RCU lock is not held while we are grabbing the RTNL.  RCU
protects the representor table, so since we will be under RTNL
we can drop RCU lock as soon as we find the netdev pointer.
RTNL is needed for the dev_set_mtu() call.

Fixes: 925b8de0aea5 ("nfp: process MTU updates from firmware flower app")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/cmsg.c