Commit ef395d24 authored by Ingo Molnar's avatar Ingo Molnar Committed by David S. Miller

[NET]: Fix unbalanced local_bh_enable() in dev_queue_xmit()

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81804c3a
...@@ -1261,6 +1261,11 @@ int dev_queue_xmit(struct sk_buff *skb) ...@@ -1261,6 +1261,11 @@ int dev_queue_xmit(struct sk_buff *skb)
struct Qdisc *q; struct Qdisc *q;
int rc = -ENOMEM; int rc = -ENOMEM;
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
local_bh_disable();
if (skb_shinfo(skb)->frag_list && if (skb_shinfo(skb)->frag_list &&
!(dev->features & NETIF_F_FRAGLIST) && !(dev->features & NETIF_F_FRAGLIST) &&
__skb_linearize(skb, GFP_ATOMIC)) __skb_linearize(skb, GFP_ATOMIC))
...@@ -1285,12 +1290,6 @@ int dev_queue_xmit(struct sk_buff *skb) ...@@ -1285,12 +1290,6 @@ int dev_queue_xmit(struct sk_buff *skb)
if (skb_checksum_help(skb, 0)) if (skb_checksum_help(skb, 0))
goto out_kfree_skb; goto out_kfree_skb;
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
local_bh_disable();
/* Updates of qdisc are serialized by queue_lock. /* Updates of qdisc are serialized by queue_lock.
* The struct Qdisc which is pointed to by qdisc is now a * The struct Qdisc which is pointed to by qdisc is now a
* rcu structure - it may be accessed without acquiring * rcu structure - it may be accessed without acquiring
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment