]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
udp: Should use spin_lock_bh()/spin_unlock_bh() in udp_lib_unhash()
authorEric Dumazet <dada1@cosmosbay.com>
Thu, 30 Oct 2008 21:00:53 +0000 (14:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Oct 2008 21:00:53 +0000 (14:00 -0700)
Spotted by Alexander Beregalov

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c

index c3ecec8a9e1cc93ef702e34225ee540f4d172596..f760b86e753099070159ceba80d99752d7109ebf 100644 (file)
@@ -970,12 +970,12 @@ void udp_lib_unhash(struct sock *sk)
        unsigned int hash = udp_hashfn(sock_net(sk), sk->sk_hash);
        struct udp_hslot *hslot = &udptable->hash[hash];
 
-       spin_lock(&hslot->lock);
+       spin_lock_bh(&hslot->lock);
        if (sk_del_node_init_rcu(sk)) {
                inet_sk(sk)->num = 0;
                sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
        }
-       spin_unlock(&hslot->lock);
+       spin_unlock_bh(&hslot->lock);
 }
 EXPORT_SYMBOL(udp_lib_unhash);