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)
commit9ce4fa548313f585c637aa846f7fc904b676bf43
treefe886227eb05c3f4839c9bc4b072571d850e52f9
parent7c8a2d8b366d2dc9e386b96e4555cc5c6932c43d
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: 2dff19622421 ("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