projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
463dde1
)
tcp: fix possible socket refcount problem for ipv6
author
Julian Anastasov
<
[email protected]
>
Wed, 5 Sep 2012 10:53:18 +0000
(10:53 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 5 Sep 2012 21:16:25 +0000
(17:16 -0400)
commit
144d56e91044181ec0ef67aeca91e9a8b5718348
("tcp: fix possible socket refcount problem") is missing
the IPv6 part. As tcp_release_cb is shared by both protocols
we should hold sock reference for the TCP_MTU_REDUCED_DEFERRED
bit.
Signed-off-by: Julian Anastasov <
[email protected]
>
Acked-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv6/tcp_ipv6.c
patch
|
blob
|
history
diff --git
a/net/ipv6/tcp_ipv6.c
b/net/ipv6/tcp_ipv6.c
index a3e60cc04a8a17e229afb44f38643ed86ac0c63e..acd32e3f1b68e7c11fd211383e05b50dfd07ee6a 100644
(file)
--- a/
net/ipv6/tcp_ipv6.c
+++ b/
net/ipv6/tcp_ipv6.c
@@
-403,8
+403,9
@@
static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
tp->mtu_info = ntohl(info);
if (!sock_owned_by_user(sk))
tcp_v6_mtu_reduced(sk);
- else
- set_bit(TCP_MTU_REDUCED_DEFERRED, &tp->tsq_flags);
+ else if (!test_and_set_bit(TCP_MTU_REDUCED_DEFERRED,
+ &tp->tsq_flags))
+ sock_hold(sk);
goto out;
}