Commit 3260155a authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

failover: change mtu has RTNL

When changing MTU, RTNL is held so use rtnl_dereference
instead of rcu_dereference.
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b09384a
...@@ -220,14 +220,14 @@ static int net_failover_change_mtu(struct net_device *dev, int new_mtu) ...@@ -220,14 +220,14 @@ static int net_failover_change_mtu(struct net_device *dev, int new_mtu)
struct net_device *primary_dev, *standby_dev; struct net_device *primary_dev, *standby_dev;
int ret = 0; int ret = 0;
primary_dev = rcu_dereference(nfo_info->primary_dev); primary_dev = rtnl_dereference(nfo_info->primary_dev);
if (primary_dev) { if (primary_dev) {
ret = dev_set_mtu(primary_dev, new_mtu); ret = dev_set_mtu(primary_dev, new_mtu);
if (ret) if (ret)
return ret; return ret;
} }
standby_dev = rcu_dereference(nfo_info->standby_dev); standby_dev = rtnl_dereference(nfo_info->standby_dev);
if (standby_dev) { if (standby_dev) {
ret = dev_set_mtu(standby_dev, new_mtu); ret = dev_set_mtu(standby_dev, new_mtu);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment