Patch "tcp: correct memory barrier usage in tcp_check_space()" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
tcp: correct memory barrier usage in tcp_check_space()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tcp-correct-memory-barrier-usage-in-tcp_check_space.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 6 16:43:17 CET 2017
From: Jason Baron <[email protected]>
Date: Tue, 24 Jan 2017 21:49:41 -0500
Subject: tcp: correct memory barrier usage in tcp_check_space()
From: Jason Baron <[email protected]>
[ Upstream commit 56d806222ace4c3aeae516cd7a855340fb2839d8 ]
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.
--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -4942,7 +4942,7 @@ static void tcp_check_space(struct sockif (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);
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/tcp-correct-memory-barrier-usage-in-tcp_check_space.patch