projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f99b494
)
netrom: Fix a data-race around sysctl_netrom_routing_control
author
Jason Xing
<kernelxing@tencent.com>
Mon, 4 Mar 2024 08:20:44 +0000
(16:20 +0800)
committer
Paolo Abeni
<pabeni@redhat.com>
Thu, 7 Mar 2024 09:36:58 +0000
(10:36 +0100)
We need to protect the reader reading the sysctl value because the
value can be changed concurrently.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/netrom/nr_route.c
patch
|
blob
|
history
diff --git
a/net/netrom/nr_route.c
b/net/netrom/nr_route.c
index b8ddd8048f352c4bad595b58d820d283b535f90b..89e12e6eea2efd92ed345ccb7f630f11687a964f 100644
(file)
--- a/
net/netrom/nr_route.c
+++ b/
net/netrom/nr_route.c
@@
-780,7
+780,7
@@
int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
return ret;
}
- if (!
sysctl_netrom_routing_control
&& ax25 != NULL)
+ if (!
READ_ONCE(sysctl_netrom_routing_control)
&& ax25 != NULL)
return 0;
/* Its Time-To-Live has expired */