Skip to content

Commit

Permalink
pkt_sched: Fix missed RCU unlock in dev_queue_xmit()
Browse files Browse the repository at this point in the history
Noticed by Jarek Poplawski.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 18, 2008
1 parent 13601cd commit 96d2031
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1805,14 +1805,12 @@ int dev_queue_xmit(struct sk_buff *skb)
spin_lock(root_lock);

if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) {
spin_unlock(root_lock);
kfree_skb(skb);
rc = NET_XMIT_DROP;
goto out_kfree_skb;
} else {
rc = qdisc_enqueue_root(skb, q);
qdisc_run(q);
}

rc = qdisc_enqueue_root(skb, q);
qdisc_run(q);

spin_unlock(root_lock);

goto out;
Expand Down

0 comments on commit 96d2031

Please sign in to comment.