This is a note to let you know that I've just added the patch titled
net-tcp: fix panic in tcp_fastopen_cache_set()
to the 3.10-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:
net-tcp-fix-panic-in-tcp_fastopen_cache_set.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 07d457d33d7b855caf511ba27ae2973a2a28d2d6 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Wed, 13 Nov 2013 15:00:46 -0800
Subject: net-tcp: fix panic in tcp_fastopen_cache_set()
From: Eric Dumazet <[email protected]>
[ Upstream commit dccf76ca6b626c0c4a4e09bb221adee3270ab0ef ]
We had some reports of crashes using TCP fastopen, and Dave Jones
gave a nice stack trace pointing to the error.
Issue is that tcp_get_metrics() should not be called with a NULL dst
Fixes: 1fe4c481ba637 ("net-tcp: Fast Open client - cookie cache")
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Dave Jones <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Acked-by: Yuchung Cheng <[email protected]>
Tested-by: Dave Jones <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv4/tcp_metrics.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -665,10 +665,13 @@ void tcp_fastopen_cache_get(struct sock
void tcp_fastopen_cache_set(struct sock *sk, u16 mss,
struct tcp_fastopen_cookie *cookie, bool syn_lost)
{
+ struct dst_entry *dst = __sk_dst_get(sk);
struct tcp_metrics_block *tm;
+ if (!dst)
+ return;
rcu_read_lock();
- tm = tcp_get_metrics(sk, __sk_dst_get(sk), true);
+ tm = tcp_get_metrics(sk, dst, true);
if (tm) {
struct tcp_fastopen_metrics *tfom = &tm->tcpm_fastopen;
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/net-8139cp-fix-a-bug_on-triggered-by-wrong-bytes_compl.patch
queue-3.10/net-tcp-fix-panic-in-tcp_fastopen_cache_set.patch
queue-3.10/tcp-tsq-restore-minimal-amount-of-queueing.patch
queue-3.10/ipv6-fix-possible-seqlock-deadlock-in-ip6_finish_output2.patch
queue-3.10/tcp-don-t-update-snd_nxt-when-a-socket-is-switched-from-repair-mode.patch
queue-3.10/inet-fix-possible-seqlock-deadlocks.patch
queue-3.10/net-clamp-msg_namelen-instead-of-returning-an-error.patch
queue-3.10/af_packet-block-bh-in-prb_shutdown_retire_blk_timer.patch
queue-3.10/ipv4-fix-possible-seqlock-deadlock.patch
queue-3.10/tcp-gso-fix-truesize-tracking.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html