aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-27 16:41:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-27 16:41:13 -0400
commit8f98bcdf8f9638ee012ff09c6c8732e0fda6018a (patch)
tree1701863428e97735dc9cafa4740dba179e7820d7 /net/sched
parent7ffb9e116fb0abe12b29c81d56bb8a9f498ee1a9 (diff)
parent9302d7bb0c5cd46be5706859301f18c137b2439f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Don't use MMIO on certain iwlwifi devices otherwise we get a firmware crash. 2) Don't corrupt the GRO lists of mac80211 contexts by doing sends via timer interrupt, from Johannes Berg. 3) SKB tailroom is miscalculated in AP_VLAN crypto code, from Michal Kazior. 4) Fix fw_status memory leak in iwlwifi, from Haim Dreyfuss. 5) Fix use after free in iwl_mvm_d0i3_enable_tx(), from Eliad Peller. 6) JIT'ing of large BPF programs is broken on x86, from Alexei Starovoitov. 7) EMAC driver ethtool register dump size is miscalculated, from Ivan Mikhaylov. 8) Fix PHY initial link mode when autonegotiation is disabled in amd-xgbe, from Tom Lendacky. 9) Fix NULL deref on SOCK_DEAD socket in AF_UNIX and CAIF protocols, from Mark Salyzyn. 10) credit_bytes not initialized properly in xen-netback, from Ross Lagerwall. 11) Fallback from MSI-X to INTx interrupts not handled properly in mlx4 driver, fix from Benjamin Poirier. 12) Perform ->attach() after binding dev->qdisc in packet scheduler, otherwise we can crash. From Cong WANG. 13) Don't clobber data in sctp_v4_map_v6(). From Jason Gunthorpe. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits) sctp: Fix mangled IPv4 addresses on a IPv6 listening socket net_sched: invoke ->attach() after setting dev->qdisc xen-netfront: properly destroy queues when removing device mlx4_core: Fix fallback from MSI-X to INTx xen/netback: Properly initialize credit_bytes net: netxen: correct sysfs bin attribute return code tools: bpf_jit_disasm: fix segfault on disabled debugging log output unix/caif: sk_socket can disappear when state is unlocked amd-xgbe-phy: Fix initial mode when autoneg is disabled net: dp83640: fix improper double spin locking. net: dp83640: reinforce locking rules. net: dp83640: fix broken calibration routine. net: stmmac: create one debugfs dir per net-device net/ibm/emac: fix size of emac dump memory areas x86: bpf_jit: fix compilation of large bpf programs net: phy: bcm7xxx: Fix 7425 PHY ID and flags iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx() iwlwifi: mvm: clean net-detect info if device was reset during suspend iwlwifi: mvm: take the UCODE_DOWN reference when resuming iwlwifi: mvm: BT Coex - duplicate the command if sent ASYNC ...
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_api.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index ad9eed70bc8f..1e1c89e51a11 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -815,10 +815,8 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
815 if (dev->flags & IFF_UP) 815 if (dev->flags & IFF_UP)
816 dev_deactivate(dev); 816 dev_deactivate(dev);
817 817
818 if (new && new->ops->attach) { 818 if (new && new->ops->attach)
819 new->ops->attach(new); 819 goto skip;
820 num_q = 0;
821 }
822 820
823 for (i = 0; i < num_q; i++) { 821 for (i = 0; i < num_q; i++) {
824 struct netdev_queue *dev_queue = dev_ingress_queue(dev); 822 struct netdev_queue *dev_queue = dev_ingress_queue(dev);
@@ -834,12 +832,16 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
834 qdisc_destroy(old); 832 qdisc_destroy(old);
835 } 833 }
836 834
835skip:
837 if (!ingress) { 836 if (!ingress) {
838 notify_and_destroy(net, skb, n, classid, 837 notify_and_destroy(net, skb, n, classid,
839 dev->qdisc, new); 838 dev->qdisc, new);
840 if (new && !new->ops->attach) 839 if (new && !new->ops->attach)
841 atomic_inc(&new->refcnt); 840 atomic_inc(&new->refcnt);
842 dev->qdisc = new ? : &noop_qdisc; 841 dev->qdisc = new ? : &noop_qdisc;
842
843 if (new && new->ops->attach)
844 new->ops->attach(new);
843 } else { 845 } else {
844 notify_and_destroy(net, skb, n, classid, old, new); 846 notify_and_destroy(net, skb, n, classid, old, new);
845 } 847 }