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

dev: annotate accesses to dev->link

Following patch will read dev->link locklessly,
annotate the write from do_setlink().
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f694eee9
...@@ -2956,7 +2956,7 @@ static int do_setlink(const struct sk_buff *skb, ...@@ -2956,7 +2956,7 @@ static int do_setlink(const struct sk_buff *skb,
write_lock(&dev_base_lock); write_lock(&dev_base_lock);
if (dev->link_mode ^ value) if (dev->link_mode ^ value)
status |= DO_SETLINK_NOTIFY; status |= DO_SETLINK_NOTIFY;
dev->link_mode = value; WRITE_ONCE(dev->link_mode, value);
write_unlock(&dev_base_lock); write_unlock(&dev_base_lock);
} }
......
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