projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a2968e
)
net: remove dev_base_lock from do_setlink()
author
Eric Dumazet
<edumazet@google.com>
Tue, 13 Feb 2024 06:32:43 +0000
(06:32 +0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 14 Feb 2024 11:20:14 +0000
(11:20 +0000)
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>
net/core/rtnetlink.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/rtnetlink.c
b/net/core/rtnetlink.c
index e484ba44f23b2571b774d0f4389500735d4360fd..39e66bf3e2384eb8e533441301fa950e77291d2c 100644
(file)
--- 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]) {