* [PATCH] ppp: fix pptp double release_sock in pptp_bind()
@ 2011-12-07 1:47 Djalal Harouni
2011-12-07 4:59 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Djalal Harouni @ 2011-12-07 1:47 UTC (permalink / raw)
To: Dmitry Kozlov; +Cc: netdev, linux-kernel
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ppp: fix pptp double release_sock in pptp_bind()
2011-12-07 1:47 [PATCH] ppp: fix pptp double release_sock in pptp_bind() Djalal Harouni
@ 2011-12-07 4:59 ` Eric Dumazet
2011-12-07 18:38 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2011-12-07 4:59 UTC (permalink / raw)
To: Djalal Harouni; +Cc: Dmitry Kozlov, netdev, linux-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ppp: fix pptp double release_sock in pptp_bind()
2011-12-07 4:59 ` Eric Dumazet
@ 2011-12-07 18:38 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-12-07 18:38 UTC (permalink / raw)
To: eric.dumazet; +Cc: tixxdz, xeb, netdev, linux-kernel
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 07 Dec 2011 05:59:54 +0100
> Le mercredi 07 décembre 2011 à 02:47 +0100, Djalal Harouni a écrit :
>> Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
...
> Nice catch !
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-07 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 1:47 [PATCH] ppp: fix pptp double release_sock in pptp_bind() Djalal Harouni
2011-12-07 4:59 ` Eric Dumazet
2011-12-07 18:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).