projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f694eee
)
dev: annotate accesses to dev->link
author
Eric Dumazet
<edumazet@google.com>
Tue, 13 Feb 2024 06:32:35 +0000
(06:32 +0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 14 Feb 2024 11:20:13 +0000
(11:20 +0000)
Following patch will read dev->link locklessly,
annotate the write from do_setlink().
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c
patch
|
blob
|
history
diff --git
a/net/core/rtnetlink.c
b/net/core/rtnetlink.c
index 6f1c5537e8421bdb677e926e7fc9be1beb5ff969..fd47a4422a51dd3fade1776a4e26ba97b60843c1 100644
(file)
--- a/
net/core/rtnetlink.c
+++ b/
net/core/rtnetlink.c
@@
-2956,7
+2956,7
@@
static int do_setlink(const struct sk_buff *skb,
write_lock(&dev_base_lock);
if (dev->link_mode ^ value)
status |= DO_SETLINK_NOTIFY;
-
dev->link_mode = value
;
+
WRITE_ONCE(dev->link_mode, value)
;
write_unlock(&dev_base_lock);
}