netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: Make sure BHs are disabled in sock_prot_inuse_add()
@ 2008-11-24 17:23 Eric Dumazet
  2008-11-24 22:05 ` David Miller
  2008-11-25 20:35 ` Eric Dumazet
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2008-11-24 17:23 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

Third round of patch about sock_prot_inuse_add() ...

Thanks

[PATCH] net: Make sure BHs are disabled in sock_prot_inuse_add()

There is still a call to sock_prot_inuse_add() in af_netlink
while in a preemptable section. Add explicit BH disable around
this call.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

[-- Attachment #2: af_netlink.patch --]
[-- Type: text/plain, Size: 402 bytes --]

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c7d7657..9eb895c 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -515,7 +515,9 @@ static int netlink_release(struct socket *sock)
 	kfree(nlk->groups);
 	nlk->groups = NULL;
 
+	local_bh_disable();
 	sock_prot_inuse_add(sock_net(sk), &netlink_proto, -1);
+	local_bh_enable();
 	sock_put(sk);
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-25 21:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 17:23 [PATCH] net: Make sure BHs are disabled in sock_prot_inuse_add() Eric Dumazet
2008-11-24 22:05 ` David Miller
2008-11-25 20:35 ` Eric Dumazet
2008-11-25 21:53   ` 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).