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
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Nov 25, 2008
1 parent 8eecaba commit 5bc0b3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bc0b3b

Please sign in to comment.