| Submitter | Eric Dumazet |
|---|---|
| Date | Oct. 30, 2008, 1:21 p.m. |
| Message ID | <4909B4D9.20807@cosmosbay.com> |
| Download | mbox | patch |
| Permalink | /patch/6497/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
From: Eric Dumazet <dada1@cosmosbay.com> Date: Thu, 30 Oct 2008 14:21:29 +0100 > [PATCH] 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> Applied, thanks for fixing this so quickly Eric. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index c3ecec8..f760b86 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -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);