Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Djalal Harouni <tixxdz@opendz.org>
Cc: Dmitry Kozlov <xeb@mail.ru>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ppp: fix pptp double release_sock in pptp_bind()
Date: Wed, 07 Dec 2011 05:59:54 +0100	[thread overview]
Message-ID: <1323233994.2690.29.camel@edumazet-laptop> (raw)
In-Reply-To: <20111207014712.GB25869@dztty>

Le mercredi 07 décembre 2011 à 02:47 +0100, Djalal Harouni a écrit :
> Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
> ---
>  drivers/net/ppp/pptp.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
> index 89f829f..f8a6853 100644
> --- a/drivers/net/ppp/pptp.c
> +++ b/drivers/net/ppp/pptp.c
> @@ -423,10 +423,8 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
>  	lock_sock(sk);
>  
>  	opt->src_addr = sp->sa_addr.pptp;
> -	if (add_chan(po)) {
> -		release_sock(sk);
> +	if (add_chan(po))
>  		error = -EBUSY;
> -	}
>  
>  	release_sock(sk);
>  	return error;

Nice catch !

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

  reply	other threads:[~2011-12-07  4:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  1:47 [PATCH] ppp: fix pptp double release_sock in pptp_bind() Djalal Harouni
2011-12-07  4:59 ` Eric Dumazet [this message]
2011-12-07 18:38   ` 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=1323233994.2690.29.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tixxdz@opendz.org \
    --cc=xeb@mail.ru \
    /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