Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29178
b: refs/heads/master
c: d4828d8
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 23, 2006
1 parent d78419c commit dfce962
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e2707fa3aed8c24075087cbaea2628725adbe55
refs/heads/master: d4828d85d188dc70ed172802e798d3978bb6e29e
6 changes: 3 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ int dev_queue_xmit(struct sk_buff *skb)
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
local_bh_disable();
rcu_read_lock_bh();

/* Updates of qdisc are serialized by queue_lock.
* The struct Qdisc which is pointed to by qdisc is now a
Expand Down Expand Up @@ -1369,13 +1369,13 @@ int dev_queue_xmit(struct sk_buff *skb)
}

rc = -ENETDOWN;
local_bh_enable();
rcu_read_unlock_bh();

out_kfree_skb:
kfree_skb(skb);
return rc;
out:
local_bh_enable();
rcu_read_unlock_bh();
return rc;
}

Expand Down
12 changes: 9 additions & 3 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,13 @@ static inline int qdisc_restart(struct net_device *dev)

void __qdisc_run(struct net_device *dev)
{
if (unlikely(dev->qdisc == &noop_qdisc))
goto out;

while (qdisc_restart(dev) < 0 && !netif_queue_stopped(dev))
/* NOTHING */;

out:
clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
}

Expand Down Expand Up @@ -583,10 +587,12 @@ void dev_deactivate(struct net_device *dev)

dev_watchdog_down(dev);

while (test_bit(__LINK_STATE_SCHED, &dev->state))
yield();
/* Wait for outstanding dev_queue_xmit calls. */
synchronize_rcu();

spin_unlock_wait(&dev->_xmit_lock);
/* Wait for outstanding qdisc_run calls. */
while (test_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
yield();
}

void dev_init_scheduler(struct net_device *dev)
Expand Down

0 comments on commit dfce962

Please sign in to comment.