public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Patch "tcp: tcp_probe: use spin_lock_bh()" has been added to the 4.9-stable tree
@ 2017-06-15  7:40 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-15  7:40 UTC (permalink / raw)
  To: edumazet, alexander.levin, davem, gregkh, rnsanchez
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    tcp: tcp_probe: use spin_lock_bh()

to the 4.9-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-tcp_probe-use-spin_lock_bh.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Jun 15 09:31:48 CEST 2017
From: Eric Dumazet <edumazet@google.com>
Date: Tue, 23 May 2017 21:53:32 -0400
Subject: tcp: tcp_probe: use spin_lock_bh()

From: Eric Dumazet <edumazet@google.com>


[ Upstream commit e70ac171658679ecf6bea4bbd9e9325cd6079d2b ]

tcp_rcv_established() can now run in process context.

We need to disable BH while acquiring tcp probe spinlock,
or risk a deadlock.

Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ricardo Nabinger Sanchez <rnsanchez@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/tcp_probe.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -117,7 +117,7 @@ static void jtcp_rcv_established(struct
 	     (fwmark > 0 && skb->mark == fwmark)) &&
 	    (full || tp->snd_cwnd != tcp_probe.lastcwnd)) {
 
-		spin_lock(&tcp_probe.lock);
+		spin_lock_bh(&tcp_probe.lock);
 		/* If log fills, just silently drop */
 		if (tcp_probe_avail() > 1) {
 			struct tcp_log *p = tcp_probe.log + tcp_probe.head;
@@ -157,7 +157,7 @@ static void jtcp_rcv_established(struct
 			tcp_probe.head = (tcp_probe.head + 1) & (bufsize - 1);
 		}
 		tcp_probe.lastcwnd = tp->snd_cwnd;
-		spin_unlock(&tcp_probe.lock);
+		spin_unlock_bh(&tcp_probe.lock);
 
 		wake_up(&tcp_probe.wait);
 	}


Patches currently in stable-queue which might be from edumazet@google.com are

queue-4.9/tcp-tcp_probe-use-spin_lock_bh.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-15  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15  7:40 Patch "tcp: tcp_probe: use spin_lock_bh()" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox