1. 09 8月, 2012 19 次提交
    • E
      igb: fix panic while dumping packets on Tx hang with IOMMU · b669588a
      Emil Tantilov 提交于
      This patch resolves a "BUG: unable to handle kernel paging request at ..."
      oops while dumping packet data. The issue occurs with IOMMU enabled due to
      the address provided by phys_to_virt().
      
      This patch avoids phys_to_virt() by making using skb->data and the address
      of the pages allocated for Rx.
      Signed-off-by: NEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: NJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
      b669588a
    • E
      tcp: must free metrics at net dismantle · 36471012
      Eric Dumazet 提交于
      We currently leak all tcp metrics at struct net dismantle time.
      
      tcp_net_metrics_exit() frees the hash table, we must first
      iterate it to free all metrics.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      36471012
    • A
      net/stmmac: mark probe function as __devinit · f5addb91
      Arnd Bergmann 提交于
      Driver probe functions are generally __devinit so they will be
      discarded after initialization for non-hotplug kernels.
      This was found by a new warning after patch 6a228452 "stmmac: Add
      device-tree support" adds a new __devinit function that is called
      from stmmac_pltfr_probe.
      
      Without this patch, building socfpga_defconfig results in:
      
      WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
      The function stmmac_pltfr_probe() references
      the function __devinit stmmac_probe_config_dt().
      This is often because stmmac_pltfr_probe lacks a __devinit
      annotation or the annotation of stmmac_probe_config_dt is wrong.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5addb91
    • S
      lpc_eth: remove obsolete ifdefs · 3a32aea6
      stigge@antcom.de 提交于
      The #ifdefs regarding CONFIG_ARCH_LPC32XX_MII_SUPPORT and
      CONFIG_ARCH_LPC32XX_IRAM_FOR_NET are obsolete since the symbols have been
      removed from Kconfig and replaced by devicetree based configuration.
      Signed-off-by: NRoland Stigge <stigge@antcom.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a32aea6
    • A
      net/core: Fix potential memory leak in dev_set_alias() · 7364e445
      Alexey Khoroshilov 提交于
      Do not leak memory by updating pointer with potentially NULL realloc return value.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7364e445
    • J
      cdc-phonet: Don't leak in usbpn_open · 47dffc75
      Jesper Juhl 提交于
      We allocate memory for 'req' with usb_alloc_urb() and then test
      'if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD))'.
      If we enter that branch due to '!req' then there is no problem. But if
      we enter the branch due to 'req' being != 0 and the 'rx_submit()' call
      being false, then we'll leak the memory we allocated.
      Deal with the leak by always calling 'usb_free_urb(req)' when entering
      the branch. If 'req' happens to be 0 then the call is harmless, if it
      is not 0 then we free the memory we allocated but don't need.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NRémi Denis-Courmont <remi@remlab.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47dffc75
    • J
      batman-adv: Fix mem leak in the batadv_tt_local_event() function · 155e4e12
      Jesper Juhl 提交于
      Memory is allocated for 'tt_change_node' with kmalloc().
      'tt_change_node' may go out of scope really being used for anything
      (except have a few members initialized) if we hit the 'del:' label.
      This patch makes sure we free the memory in that case.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NAntonio Quartulli <ordex@autistici.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      155e4e12
    • P
      sched: add missing group change to qfq_change_class · be72f63b
      Paolo Valente 提交于
      [Resending again, as the text was corrupted by the email client]
      
      To speed up operations, QFQ internally divides classes into
      groups. Which group a class belongs to depends on the ratio between
      the maximum packet length and the weight of the class. Unfortunately
      the function qfq_change_class lacks the steps for changing the group
      of a class when the ratio max_pkt_len/weight of the class changes.
      
      For example, when the last of the following three commands is
      executed, the group of class 1:1 is not correctly changed:
      
      tc disc add dev XXX root handle 1: qfq
      tc class add dev XXX parent 1: qfq classid 1:1 weight 1
      tc class change dev XXX parent 1: classid 1:1 qfq weight 4
      
      Not changing the group of a class does not affect the long-term
      bandwidth guaranteed to the class, as the latter is independent of the
      maximum packet length, and correctly changes (only) if the weight of
      the class changes. In contrast, if the group of the class is not
      updated, the class is still guaranteed the short-term bandwidth and
      packet delay related to its old group, instead of the guarantees that
      it should receive according to its new weight and/or maximum packet
      length. This may also break service guarantees for other classes.
      This patch adds the missing operations.
      Signed-off-by: NPaolo Valente <paolo.valente@unimore.it>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be72f63b
    • E
      net: force dst_default_metrics to const section · a37e6e34
      Eric Dumazet 提交于
      While investigating on network performance problems, I found this little
      gem :
      
      $ nm -v vmlinux | grep -1 dst_default_metrics
      ffffffff82736540 b busy.46605
      ffffffff82736560 B dst_default_metrics
      ffffffff82736598 b dst_busy_list
      
      Apparently, declaring a const array without initializer put it in
      (writeable) bss section, in middle of possibly often dirtied cache
      lines.
      
      Since we really want dst_default_metrics be const to avoid any possible
      false sharing and catch any buggy writes, I force a null initializer.
      
      ffffffff818a4c20 R dst_default_metrics
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a37e6e34
    • E
      net: fib: fix incorrect call_rcu_bh() · 0c03eca3
      Eric Dumazet 提交于
      After IP route cache removal, I believe rcu_bh() has very little use and
      we should remove this RCU variant, since it adds some cycles in fast
      path.
      
      Anyway, the call_rcu_bh() use in fib_true is obviously wrong, since
      some users only assert rcu_read_lock().
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c03eca3
    • G
      pptp: lookup route with the proper net namespace · 08252b32
      Gao feng 提交于
      pptp always use init_net as the net namespace to lookup
      route, this will cause route lookup failed in container.
      
      because we already set the correct net namespace to struct
      sock in pptp_create,so fix this by using sock_net(sk) to
      replace &init_net.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08252b32
    • D
      Merge branch 'fixes-for-3.6' of git://gitorious.org/linux-can/linux-can · d933d2be
      David S. Miller 提交于
      Marc Kleine-Budde says:
      
      ====================
      here's a fix intended for the v3.6 release cycle. Oliver noticed and
      fixed that the flags definition for the new canfd_frame contains
      redundant and confusing information.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d933d2be
    • Y
      af_packet: Quiet sparse noise about using plain integer as NULL pointer · 99aa3473
      Ying Xue 提交于
      Quiets the sparse warning:
      warning: Using plain integer as NULL pointer
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99aa3473
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/ppwaskie/net · b9ad2baf
      David S. Miller 提交于
      Peter P Waskiewicz Jr says:
      
      ====================
      This series contains fixes to the e1000e and igb drivers.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9ad2baf
    • S
      drivers: net: irda: bfin_sir: fix compile error · 920d087e
      Sonic Zhang 提交于
      Bit IREN is replaced by UMOD_IRDA and UMOD_MASK since blackfin 60x added, but
      this driver didn't update which will cause bfin_sir build error:
      
      drivers/net/irda/bfin_sir.c:161:9: error: 'IREN' undeclared (first use in this
      function)
      drivers/net/irda/bfin_sir.c:435:18: error: 'IREN' undeclared (first use in
      this function)
      drivers/net/irda/bfin_sir.c:521:11: error: 'IREN' undeclared (first use in
      this function)
      
      This patch fix it.
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Acked-by: NSamuel Ortiz <samuel@sortiz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      920d087e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f4ba394c
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Missed rcu_assign_pointer() in mac80211 scanning, from Johannes
          Berg.
      
       2) Allow devices to limit the number of segments that an individual
          TCP TSO packet can use at a time, to deal with device and/or driver
          specific limitations.  From Ben Hutchings.
      
       3) Fix unexpected hard IPSEC expiration after setting the date.  From
          Fan Du.
      
       4) Memory leak fix in bxn2x driver, from Jesper Juhl.
      
       5) Fix two memory leaks in libertas driver, from Daniel Drake.
      
       6) Fix deref of out-of-range array index in packet scheduler generic
          actions layer.  From Hiroaki SHIMODA.
      
       7) Fix TX flow control errors in mlx4 driver, from Yevgeny Petrilin.
      
       8) Fix CRIS eth_v10.c driver build, from Randy Dunlap.
      
       9) Fix wrong SKB freeing in LLC protocol layer, from Sorin Dumitru.
      
      10) The IP output path checks neigh lookup errors incorrectly, it needs
          to use IS_ERR().  From Vasiliy Kulikov.
      
      11) An estimator leak leads to deref of freed memory in timer handler,
          fix from Hiroaki SHIMODA.
      
      12) TCP early demux in ipv6 needs to use DST cookies in order to
          validate the RX route properly.  Fix from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
        net: ipv6: fix TCP early demux
        net: Use PTR_RET rather than if(IS_ERR(.. [1]
        net_sched: act: Delete estimator in error path.
        ip: fix error handling in ip_finish_output2()
        llc: free the right skb
        ixp4xx_eth: fix ptp_ixp46x build failure
        drivers/atm/iphase.c: fix error return code
        tcp_output: fix sparse warning for tcp_wfree
        drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data
        batman-adv: select an internet gateway if none was chosen
        mISDN: Bugfix for layer2 fixed TEI mode
        igb: don't break user visible strings over multiple lines in igb_ethtool.c
        igb: correct hardware type (i210/i211) check in igb_loopback_test()
        igb: Fix for failure to init on some 82576 devices.
        cris: fix eth_v10.c build error
        cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN
        isdnloop: fix and simplify isdnloop_init()
        hyperv: Move wait completion msg code into rndis_filter_halt_device()
        net/mlx4_core: Remove port type restrictions
        net/mlx4_en: Fixing TX queue stop/wake flow
        ...
      f4ba394c
    • L
      Merge tag 'pinctrl-fixes-for-v3.6-rc1' of... · bf44ce83
      Linus Torvalds 提交于
      Merge tag 'pinctrl-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
      
      Pull pinctrl fixes from Linus Walleij:
       - Move MXS pinctrl registration to poscore_initcall
       - Fix up various devm_* managed resources code paths
       - Fix one function group in the Nomadik driver
       - Update MAINTAINERS
      
      * tag 'pinctrl-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        drivers/pinctrl/pinctrl-nomadik.c: drop devm_kfree of devm_kzalloc'd data
        MAINTAINERS: fix a few pinctrl related entries
        pinctrl-sirf: remove devm_kfree at error path
        pinctrl/nomadik: fix hsi function group list
        pinctrl/pinctrl-u300: remove unneeded devm_kfree call
        pinctrl: mxs: register driver at postcore_initcall time
      bf44ce83
    • L
      Merge tag 'iommu-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 7f46f9c1
      Linus Torvalds 提交于
      Pull IOMMU fixes from Joerg Roedel:
       "These patches fix a couple of issues.  First of all a few problems
        with ACS on x86 introduced in the last merge window, where ACS did not
        work on AMD and a NULL pointer dereference when there ran against
        SR-IOV devices.
      
        The patches fallen out of coccinelle checks fix a possible invalid
        memory reference and a possible memory leak.  The other patches mostly
        fix build errors and warnings and a wrong return value."
      
      * tag 'iommu-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix ACS path checking
        iommu/intel: Fix ACS path checking
        iommu/amd: Fix pci_request_acs() call-place
        iommu/exynos: Fix build error
        iommu/tegra: smmu: Fix error initial value at domain_init
        iommu/tegra: smmu: Cleanup with lesser nest
        iommu: Add missing forward declaration in include file
        iommu: Include linux/types.h
        iommu/intel: add missing free_domain_mem
        iommu/tegra: remove invalid reference to list iterator variable
      7f46f9c1
    • L
      Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 6666cabf
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Containing only a few really small/trivial fixes.  The only urgent fix
        is a regression fix of HDMI codec probing, introduced in 3.6-rc1.  The
        rest are HD-audio specific fixes and a copule of minor bug fixes in
        PCM core and the old emu10k1."
      
      * tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
        ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
        ALSA: hda - remove redundant auto quirks for conexant 506x
        ALSA: hda - remove quirk for Dell Vostro 1015
        ALSA: hda - add dock support for Thinkpad X230
        ALSA: hda - Fix regression of HDMI codec probing
        ALSA: hda - add dock support for Thinkpad T430s
        ALSA: emu10k1: Avoid access to invalid pages when period=1
        ALSA: PCM: Fix possible memory leaks in the error path
      6666cabf
  2. 08 8月, 2012 2 次提交
  3. 07 8月, 2012 19 次提交