projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tcp: Fix data-races around sysctl_tcp_syncookies.
[linux-2.6-microblaze.git]
/
net
/
ipv4
/
syncookies.c
diff --git
a/net/ipv4/syncookies.c
b/net/ipv4/syncookies.c
index
b387c48
..
9b234b4
100644
(file)
--- a/
net/ipv4/syncookies.c
+++ b/
net/ipv4/syncookies.c
@@
-340,7
+340,8
@@
struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
struct flowi4 fl4;
u32 tsoff = 0;
- if (!sock_net(sk)->ipv4.sysctl_tcp_syncookies || !th->ack || th->rst)
+ if (!READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_syncookies) ||
+ !th->ack || th->rst)
goto out;
if (tcp_synq_no_recent_overflow(sk))