summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-11-25 13:53:27 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-25 13:53:27 -0800
commit5bc0b3bfa758e4ae49c94e31c1edb9a5f10a8060 (patch)
tree229c10e9c3db1b0e6b1dc0ac2b3964340d2f1732 /net/sctp
parent8eecaba900e89643029fd2c253ad8ebb60761165 (diff)
downloadlinux-stable-5bc0b3bfa758e4ae49c94e31c1edb9a5f10a8060.tar.gz
linux-stable-5bc0b3bfa758e4ae49c94e31c1edb9a5f10a8060.tar.bz2
linux-stable-5bc0b3bfa758e4ae49c94e31c1edb9a5f10a8060.zip
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() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f03af84edf63..ba81fe3ccab8 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -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