projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5207f39
)
tcp: correct memory barrier usage in tcp_check_space()
author
Jason Baron
<
[email protected]
>
Wed, 25 Jan 2017 02:49:41 +0000
(21:49 -0500)
committer
David S. Miller
<
[email protected]
>
Wed, 25 Jan 2017 18:23:36 +0000
(13:23 -0500)
sock_reset_flag() maps to __clear_bit() not the atomic version clear_bit().
Thus, we need smp_mb(), smp_mb__after_atomic() is not sufficient.
Fixes: 3c7151275c0c ("tcp: add memory barriers to write space paths")
Cc: Eric Dumazet <
[email protected]
>
Cc: Oleg Nesterov <
[email protected]
>
Signed-off-by: Jason Baron <
[email protected]
>
Acked-by: Eric Dumazet <
[email protected]
>
Reported-by: Oleg Nesterov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/tcp_input.c
patch
|
blob
|
history
diff --git
a/net/ipv4/tcp_input.c
b/net/ipv4/tcp_input.c
index 6c790754ae3ebfad5d31499eabbed7b5c3b360c4..41dcbd568cbe2403f2a9e659669afe462a42e228 100644
(file)
--- a/
net/ipv4/tcp_input.c
+++ b/
net/ipv4/tcp_input.c
@@
-5078,7
+5078,7
@@
static void tcp_check_space(struct sock *sk)
if (sock_flag(sk, SOCK_QUEUE_SHRUNK)) {
sock_reset_flag(sk, SOCK_QUEUE_SHRUNK);
/* pairs with tcp_poll() */
- smp_mb
__after_atomic
();
+ smp_mb();
if (sk->sk_socket &&
test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) {
tcp_new_space(sk);