net: Make sure BHs are disabled in sock_prot_inuse_add()
Subsystems (3)
PATCH 1/1 net: Make sure BHs are disabled in sock_prot_inuse_add()
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.
net/netlink/af_netlink.c +2 -0
@@ -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 ; }
From: Eric Dumazet <[email protected]>
Date: Mon, 24 Nov 2008 18:23:24 +0100
Quoted 11 lines
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()inaf_netlinkwhile in a preemptable section. Add explicit BH disable around this call.Signed-off-by Eric Dumazet <[email protected]>
Applied, thanks Eric.
PATCH 1/1 net: Make sure BHs are disabled in sock_prot_inuse_add()
In reply to Eric DumazetOh well...
[PATCH] net: Make sure BHs are disabled in sock_prot_inuse_add()
prot->destroy is not called with BH disabled. So we must add explicit BH disable around call to sock_prot_inuse_add() in sctp_destroy_sock()
net/sctp/socket.c +2 -0
@@ -3633,7 +3633,9 @@ SCTP_STATIC void sctp_destroy_sock(struct sock *sk) ep =sctp_sk (sk)->ep;sctp_endpoint_free (ep);atomic_dec (&sctp_sockets_allocated); +local_bh_disable ();sock_prot_inuse_add (sock_net (sk), sk->sk_prot,-1 ); +local_bh_enable (); }/* API 4.1.7 shutdown() - TCP Style Syntax
From: Eric Dumazet <[email protected]>
Date: Tue, 25 Nov 2008 21:35:23 +0100
Quoted 9 lines
Oh well...
[PATCH] net: Make sure BHs are disabled in
sock_prot_inuse_add()
prot->destroyis not called with BH disabled. So we must add explicit BH disable around call tosock_prot_inuse_add()insctp_destroy_sock()Signed-off-by Eric Dumazet <[email protected]>
At least it was found eventually :)
Applied, thanks Eric.