Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net_failover: hold the netdev lists lock when retrieving device stati…
…stics In the effort of making .ndo_get_stats64 be able to sleep, we need to ensure the callers of dev_get_stats do not use atomic context. The net_failover driver makes copious abuse of RCU protection for the slave interfaces, which is probably unnecessary given the fact that it already calls dev_hold on slave interfaces. Nonetheless, to avoid regressions, we still need to offer the same level of protection against unregistering the standby and primary devices. We can achieve this by holding the netns mutex, which gives us the sleepable context that dev_get_stats() wants to see. Holding this mutex also removes the need for a separate lock for statistics. Cc: Sridhar Samudrala <sridhar.samudrala@intel.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
- Loading branch information