public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Hugne <erik.hugne@ericsson.com>
To: Fan Du <fengyuleidian0615@gmail.com>
Cc: <netdev@vger.kernel.org>, Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: tcp_v4_err/request sock refcnt leak?
Date: Mon, 23 Mar 2015 12:15:16 +0100	[thread overview]
Message-ID: <20150323111516.GB21258@haze> (raw)
In-Reply-To: <550FEA98.3040009@gmail.com>

On Mon, Mar 23, 2015 at 06:27:36PM +0800, Fan Du wrote:
> I'm not familiar with this part, IMHO, this might be a double call for reqsk_put?

Neither am i, but the below patch does not really make sense to me.

//E


> 
> 
> diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
> index 25a9615..fd805c0 100644
> --- a/net/dccp/ipv4.c
> +++ b/net/dccp/ipv4.c
> @@ -316,7 +316,6 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
>  		 * errors returned from accept().
>  		 */
>  		inet_csk_reqsk_queue_drop(sk, req);
> -		reqsk_put(req);
>  		goto out;
> 
>  	case DCCP_REQUESTING:
> diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
> index 69d8f13..5137ab3 100644
> --- a/net/dccp/ipv6.c
> +++ b/net/dccp/ipv6.c
> @@ -174,7 +174,6 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
>  		}
> 
>  		inet_csk_reqsk_queue_drop(sk, req);
> -		reqsk_put(req);
>  		goto out;
> 
>  	case DCCP_REQUESTING:
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 5554b8f..b1eaf3d 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -487,7 +487,6 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
>  		 */
>  		inet_csk_reqsk_queue_drop(sk, req);
>  		NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS);
> -		reqsk_put(req);
>  		goto out;
> 
>  	case TCP_SYN_SENT:
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 6e3f90d..1d551fa 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -427,7 +427,6 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> 
>  		inet_csk_reqsk_queue_drop(sk, req);
>  		NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS);
> -		reqsk_put(req);
>  		goto out;
> 
>  	case TCP_SYN_SENT:
> 

  reply	other threads:[~2015-03-23 11:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23  9:03 tcp_v4_err/request sock refcnt leak? Erik Hugne
2015-03-23 10:27 ` Fan Du
2015-03-23 11:15   ` Erik Hugne [this message]
2015-03-23 14:11   ` Eric Dumazet
2015-03-24  1:49     ` Fan Du
2015-03-24  2:03       ` Eric Dumazet
2015-03-23 17:06   ` [PATCH net-next] inet: fix double request socket freeing Eric Dumazet
2015-03-23 21:01     ` David Miller
2015-03-23 22:00     ` [PATCH v2 " Eric Dumazet
2015-03-24  1:41       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150323111516.GB21258@haze \
    --to=erik.hugne@ericsson.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fengyuleidian0615@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox