sfc: protect list of RSS contexts under a mutex
authorEdward Cree <ecree@solarflare.com>
Tue, 27 Mar 2018 16:44:36 +0000 (17:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Mar 2018 17:33:20 +0000 (13:33 -0400)
commite0a65e3c5e3b7b11ec9320524b8fcc210f2026e9
treee82d5fb1d37ef7bff0c1d75a2cbe1f7f0ede3e57
parent31b842955211f427a099f78a6a63d18a6bbc8d55
sfc: protect list of RSS contexts under a mutex

Otherwise races are possible between ethtool ops and
 efx_ef10_rx_restore_rss_contexts().
Also, don't try to perform the restore on every reset, only after an MC
 reboot, otherwise we'll leak RSS contexts on the NIC.

Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/ethtool.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/nic.h