diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-06-18 22:56:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-18 22:56:18 -0700 |
commit | e0f9f8586a0b21fb3c7a4ead3804008d57dfdef7 (patch) | |
tree | 123a01b6719bf2077dc4ad79a8c80f18d4fe0246 /net/ipv4/raw.c | |
parent | 9ed19f339e12e731986de84134ac293cd15910a7 (diff) | |
download | linux-3.10-e0f9f8586a0b21fb3c7a4ead3804008d57dfdef7.tar.gz linux-3.10-e0f9f8586a0b21fb3c7a4ead3804008d57dfdef7.tar.bz2 linux-3.10-e0f9f8586a0b21fb3c7a4ead3804008d57dfdef7.zip |
[IPV4/IPV6]: Replace spin_lock_irq with spin_lock_bh
In light of my recent patch to net/ipv4/udp.c that replaced the
spin_lock_irq calls on the receive queue lock with spin_lock_bh,
here is a similar patch for all other occurences of spin_lock_irq
on receive/error queue locks in IPv4 and IPv6.
In these stacks, we know that they can only be entered from user
or softirq context. Therefore it's safe to disable BH only.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 5b1ec586bae..8c1512021ee 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -691,11 +691,11 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg) struct sk_buff *skb; int amount = 0; - spin_lock_irq(&sk->sk_receive_queue.lock); + spin_lock_bh(&sk->sk_receive_queue.lock); skb = skb_peek(&sk->sk_receive_queue); if (skb != NULL) amount = skb->len; - spin_unlock_irq(&sk->sk_receive_queue.lock); + spin_unlock_bh(&sk->sk_receive_queue.lock); return put_user(amount, (int __user *)arg); } |