Re: [PATCH] ppp: fix pptp double release_sock in pptp_bind()

From: Eric Dumazet
Date: Wed Dec 07 2011 - 00:00:09 EST


Le mercredi 07 dÃcembre 2011 Ã 02:47 +0100, Djalal Harouni a Ãcrit :
> Signed-off-by: Djalal Harouni <tixxdz@xxxxxxxxxx>
> ---
> 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@xxxxxxxxx>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/