Commit 2dd4d828 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: remove dev_base_lock from do_setlink()

We hold RTNL here, and dev->link_mode readers already
are using READ_ONCE().
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a2968ee
...@@ -2961,11 +2961,9 @@ static int do_setlink(const struct sk_buff *skb, ...@@ -2961,11 +2961,9 @@ static int do_setlink(const struct sk_buff *skb,
if (tb[IFLA_LINKMODE]) { if (tb[IFLA_LINKMODE]) {
unsigned char value = nla_get_u8(tb[IFLA_LINKMODE]); unsigned char value = nla_get_u8(tb[IFLA_LINKMODE]);
write_lock(&dev_base_lock);
if (dev->link_mode ^ value) if (dev->link_mode ^ value)
status |= DO_SETLINK_NOTIFY; status |= DO_SETLINK_NOTIFY;
WRITE_ONCE(dev->link_mode, value); WRITE_ONCE(dev->link_mode, value);
write_unlock(&dev_base_lock);
} }
if (tb[IFLA_VFINFO_LIST]) { if (tb[IFLA_VFINFO_LIST]) {
......
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