diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-10-30 17:00:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-30 17:00:53 -0400 |
commit | c8db3fec5b02f4cefe441903fe1c142ff14e1771 (patch) | |
tree | e27fc427a7d52ceca64b81d2a01a821e303075f5 /net/ipv4/udp.c | |
parent | 8cf14e38372d84ea09ba45fb60b61f6e36c18546 (diff) |
udp: Should use spin_lock_bh()/spin_unlock_bh() in udp_lib_unhash()
Spotted by Alexander Beregalov
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index c3ecec8a9e1c..f760b86e7530 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -970,12 +970,12 @@ void udp_lib_unhash(struct sock *sk) | |||
970 | unsigned int hash = udp_hashfn(sock_net(sk), sk->sk_hash); | 970 | unsigned int hash = udp_hashfn(sock_net(sk), sk->sk_hash); |
971 | struct udp_hslot *hslot = &udptable->hash[hash]; | 971 | struct udp_hslot *hslot = &udptable->hash[hash]; |
972 | 972 | ||
973 | spin_lock(&hslot->lock); | 973 | spin_lock_bh(&hslot->lock); |
974 | if (sk_del_node_init_rcu(sk)) { | 974 | if (sk_del_node_init_rcu(sk)) { |
975 | inet_sk(sk)->num = 0; | 975 | inet_sk(sk)->num = 0; |
976 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); | 976 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); |
977 | } | 977 | } |
978 | spin_unlock(&hslot->lock); | 978 | spin_unlock_bh(&hslot->lock); |
979 | } | 979 | } |
980 | EXPORT_SYMBOL(udp_lib_unhash); | 980 | EXPORT_SYMBOL(udp_lib_unhash); |
981 | 981 | ||