Skip to content

Commit

Permalink
net: Make sure BHs are disabled in sock_prot_inuse_add()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Nov 24, 2008
1 parent 920de80 commit 3755810
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3755810

Please sign in to comment.