]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: correct memory barrier usage in tcp_check_space()
authorJason Baron <jbaron@akamai.com>
Wed, 25 Jan 2017 02:49:41 +0000 (21:49 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Jan 2017 18:23:36 +0000 (13:23 -0500)
commite06cb0147eac3c5a886b15bef7d663c57dcaf953
tree3f47042bfc3d9fec74addd06837e37ae3c91eb5d
parent3e518bd0fda604f2beb81b0e6f9f3aa6712467e5
tcp: correct memory barrier usage in tcp_check_space()

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: 8ce23fc1b146 ("tcp: add memory barriers to write space paths")
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jason Baron <jbaron@akamai.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c