[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1ILEJr-0005Fl-00@gondolin.me.apana.org.au>
Date: Wed, 15 Aug 2007 16:33:35 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: 123.oleg@...il.com (oleg 123), davem@...emloft.net,
netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: linux kernel 2.6.18-20 bug: rcu_read_unlock in __sock_create
oleg 123 <123.oleg@...il.com> wrote:
>
> There is a bug in __sock_create() function (net/socket.c).
> If an error occur in LSM hook security_socket_post_create, then unneeded
> rcu_read_unlock() is made in __sock_create.
Well spotted! Please cc netdev@...r.kernel.org for networking
issues.
[NET]: Fix unbalanced rcu_read_unlock in __sock_create
The recent RCU work created an unbalanced rcu_read_unlock
in __sock_create. This patch fixes that. Reported by
oleg 123.
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/socket.c b/net/socket.c
index ec07703..7d44453 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1168,7 +1168,7 @@ static int __sock_create(int family, int type, int protocol,
module_put(pf->owner);
err = security_socket_post_create(sock, family, type, protocol, kern);
if (err)
- goto out_release;
+ goto out_sock_release;
*res = sock;
return 0;
-
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