diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-15 12:25:19 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-15 12:25:19 -0800 |
commit | f878b995b0f746f5726af9e66940f3bf373dae91 (patch) | |
tree | 81fa0cc358ff9957116468a0c37d4f7f3f493cb3 /net | |
parent | 29e1846a6ba84e0c6e257dd5b1231ed53b98fe9b (diff) | |
parent | 94b274bf5fba6c75b922c8a23ad4b5639a168780 (diff) | |
download | linux-f878b995b0f746f5726af9e66940f3bf373dae91.tar.bz2 |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 3 | ||||
-rw-r--r-- | net/sched/sch_mqprio.c | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index a4132766d363..4580460ebecd 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1648,7 +1648,8 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq) if (txq < 1 || txq > dev->num_tx_queues) return -EINVAL; - if (dev->reg_state == NETREG_REGISTERED) { + if (dev->reg_state == NETREG_REGISTERED || + dev->reg_state == NETREG_UNREGISTERING) { ASSERT_RTNL(); rc = netdev_queue_update_kobjects(dev, dev->real_num_tx_queues, diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index effd4ee0e880..ace37f9f1cd0 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -29,18 +29,18 @@ static void mqprio_destroy(struct Qdisc *sch) struct mqprio_sched *priv = qdisc_priv(sch); unsigned int ntx; - if (!priv->qdiscs) - return; - - for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++) - qdisc_destroy(priv->qdiscs[ntx]); + if (priv->qdiscs) { + for (ntx = 0; + ntx < dev->num_tx_queues && priv->qdiscs[ntx]; + ntx++) + qdisc_destroy(priv->qdiscs[ntx]); + kfree(priv->qdiscs); + } if (priv->hw_owned && dev->netdev_ops->ndo_setup_tc) dev->netdev_ops->ndo_setup_tc(dev, 0); else netdev_set_num_tc(dev, 0); - - kfree(priv->qdiscs); } static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt) |