summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-02-13 07:32:43 +0100
committerDavid S. Miller <davem@davemloft.net>2024-02-14 12:20:14 +0100
commit2dd4d828d648e101aaf19326afcdfee8667cb185 (patch)
tree03ec1b818a6a90c41b05d6fa344e8c352c05f758 /net/core
parentnet: add netdev_set_operstate() helper (diff)
downloadlinux-2dd4d828d648e101aaf19326afcdfee8667cb185.tar.xz
linux-2dd4d828d648e101aaf19326afcdfee8667cb185.zip
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: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e484ba44f23b..39e66bf3e238 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2961,11 +2961,9 @@ static int do_setlink(const struct sk_buff *skb,
if (tb[IFLA_LINKMODE]) {
unsigned char value = nla_get_u8(tb[IFLA_LINKMODE]);
- write_lock(&dev_base_lock);
if (dev->link_mode ^ value)
status |= DO_SETLINK_NOTIFY;
WRITE_ONCE(dev->link_mode, value);
- write_unlock(&dev_base_lock);
}
if (tb[IFLA_VFINFO_LIST]) {