summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorJon Maxwell <jmaxwell37@gmail.com>2017-03-22 11:31:33 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-22 11:31:33 +0000
commitdaa1fae0fb67e7a3ce347176cecdba8b0c39c309 (patch)
treee88128593c6ef3789972da8b54815ffbb5d525f9 /net/ipv4/tcp_ipv4.c
parent857b945b132c36d3407e5f47e9944db57e76b484 (diff)
parent4ab956b561334866dfe1b17d9c7567313e07cfa2 (diff)
dccp/tcp: fix routing redirect race
am: 4ab956b561 Change-Id: I9cb352108500198e4d94eb8e08b53065e29e31d4
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index cc374b4630d0..984de80590bc 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -423,7 +423,8 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
switch (type) {
case ICMP_REDIRECT:
- do_redirect(icmp_skb, sk);
+ if (!sock_owned_by_user(sk))
+ do_redirect(icmp_skb, sk);
goto out;
case ICMP_SOURCE_QUENCH:
/* Just silently ignore these. */