lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1346878620.13121.161.camel@edumazet-glaptop>
Date:	Wed, 05 Sep 2012 22:57:00 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Julian Anastasov <ja@....bg>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] tcp: fix possible socket refcount problem for ipv6

On Wed, 2012-09-05 at 23:53 +0300, Julian Anastasov wrote:
> 	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 <ja@....bg>
> ---
>  net/ipv6/tcp_ipv6.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 09078b9..f3bfb8b 100644
> --- 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;
>  	}
>  

Thanks !

Acked-by: Eric Dumazet <edumazet@...gle.com>



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ