1. 18 4月, 2013 1 次提交
  2. 17 4月, 2013 15 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · fca83168
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix erroneous netfilter drop of SIP packets generated by some Cisco
          phones, from Patrick McHardy.
      
       2) Fix netfilter IPSET refcounting in list_set_add(), from Jozsef
          Kadlecsik.
      
       3) Fix TCP syncookies route lookup key, we don't use the same values we
          would use for the usual SYN receive processing, from Dmitry Popov.
      
       4) Fix NULL deref in bond_slave_netdev_event(), from Nikolay
          Aleksandrov.
      
       5) When bonding enslave fails, we can forget to clear the IFF_BONDING
          bit, fix also from Nikolay Aleksandrov.
      
       6) skb->csum_start is 16-bits, which is almost always just fine.  But
          if we reallocate the headroom of an SKB this can push the
          skb->csum_start value outside of it's valid range.  This can easily
          happen when collapsing multiple SKBs from the retransmit queue
          together.
      
          Fix from Thomas Graf.
      
       7) Fix NULL deref in be2net driver due to missing check of
          __vlan_put_tag() return value, from Ivan Vecera.
      
       8) tun_set_iff() returns zero instead of error code on failure, fix
          from Wei Yongjun.
      
       9) Like GARP, 802 MRP needs to hold the app->lock when adding MAD
          events and queueing PDUs.  Fix from David Ward.
      
      10) Build fix, MVMDIO needs PHYLIB, from Thomas Petazzoni..
      
      11) Fix mac80211 static with ipv6 modular build, from Cong Wang.
      
      12) If userland specifies a path cost explicitly, do not override it
          when the carrier state changes.  From Stephen Hemminger.
      
      13) mvnets calculates the TX queue to use incorrectly resulting in
          garbage pointer derefs and crashes, fix from Willy Tarreau.
      
      14) cdc_mbim does erroneous sizeof(ETH_HLEN).  Fix from Bjorn Mork.
      
      15) IP fragmentation can leak a refcount-less route out from an RCU
          protected section.  This results in crashes and all sorts of hard to
          diagnose behavior.  Fix from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (24 commits)
        qlcnic: fix beaconing test for 82xx adapter
        net: drop dst before queueing fragments
        net: fec: fix regression in link change accounting
        net: cdc_mbim: remove bogus sizeof()
        drivers: net: ethernet: cpsw: get slave VLAN id from slave node instead of cpsw node
        net: mvneta: fix improper tx queue usage in mvneta_tx()
        esp4: fix error return code in esp_output()
        bridge: make user modified path cost sticky
        ipv6: statically link register_inet6addr_notifier()
        net: mvmdio: add select PHYLIB
        net/802/mrp: fix possible race condition when calling mrp_pdu_queue()
        tuntap: fix error return code in tun_set_iff()
        be2net: take care of __vlan_put_tag return value
        can: sja1000: fix handling on dt properties on little endian systems
        can: mcp251x: add missing IRQF_ONESHOT to request_threaded_irq
        netfilter: nf_nat: fix race when unloading protocol modules
        tcp: Reallocate headroom if it would overflow csum_start
        stmmac: prevent interrupt loop with MMC RX IPC Counter
        bonding: IFF_BONDING is not stripped on enslave failure
        bonding: fix netdev event NULL pointer dereference
        ...
      fca83168
    • L
      s390: move dummy io_remap_pfn_range() to asm/pgtable.h · 4f2e2903
      Linus Torvalds 提交于
      Commit b4cbb197 ("vm: add vm_iomap_memory() helper function") added
      a helper function wrapper around io_remap_pfn_range(), and every other
      architecture defined it in <asm/pgtable.h>.
      
      The s390 choice of <asm/io.h> may make sense, but is not very convenient
      for this case, and gratuitous differences like that cause unexpected errors like this:
      
         mm/memory.c: In function 'vm_iomap_memory':
         mm/memory.c:2439:2: error: implicit declaration of function 'io_remap_pfn_range' [-Werror=implicit-function-declaration]
      
      Glory be the kbuild test robot who noticed this, bisected it, and
      reported it to the guilty parties (ie me).
      
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4f2e2903
    • H
      qlcnic: fix beaconing test for 82xx adapter · 361cd29c
      Himanshu Madhani 提交于
      o Commit 319ecf12
        ("qlcnic: 83xx sysfs routines") introduced regression
        for beaconing test while refactoring 82xx code. This patch is to
        revert code to fix beaconing test for 82xx adapter.
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: NShahed Shaikh <shahed.shaikh@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      361cd29c
    • E
      net: drop dst before queueing fragments · 97599dc7
      Eric Dumazet 提交于
      Commit 4a94445c (net: Use ip_route_input_noref() in input path)
      added a bug in IP defragmentation handling, as non refcounted
      dst could escape an RCU protected section.
      
      Commit 64f3b9e2 (net: ip_expire() must revalidate route) fixed
      the case of timeouts, but not the general problem.
      
      Tom Parkin noticed crashes in UDP stack and provided a patch,
      but further analysis permitted us to pinpoint the root cause.
      
      Before queueing a packet into a frag list, we must drop its dst,
      as this dst has limited lifetime (RCU protected)
      
      When/if a packet is finally reassembled, we use the dst of the very
      last skb, still protected by RCU and valid, as the dst of the
      reassembled packet.
      
      Use same logic in IPv6, as there is no need to hold dst references.
      Reported-by: NTom Parkin <tparkin@katalix.com>
      Tested-by: NTom Parkin <tparkin@katalix.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97599dc7
    • L
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 542a6724
      Linus Torvalds 提交于
      Pull ARM fix from Russell King:
       "A build fix for an incomplete change to the ARM cpu suspend code"
      
      * branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: Do 15e0d9e3 (ARM: pm: let platforms select cpu_suspend support) properly
      542a6724
    • L
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 4be41343
      Linus Torvalds 提交于
      Pull kvm fixes from Marcelo Tosatti:
       "PPC and ARM KVM fixes"
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        ARM: KVM: fix L_PTE_S2_RDWR to actually be Read/Write
        ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting
        kvm/ppc/e500: eliminate tlb_refs
        kvm/ppc/e500: g2h_tlb1_map: clear old bit before setting new bit
        kvm/ppc/e500: h2g_tlb1_rmap: esel 0 is valid
        kvm/powerpc/e500mc: fix tlb invalidation on cpu migration
      4be41343
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes · de0024b6
      Linus Torvalds 提交于
      Pull powerpc fixes from Stephen Rothwell:
       "Three regresions in the PowerPC code.  One from v3.7 the others from
        this merge window."
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes:
        powerpc: add a missing label in resume_kernel
        powerpc: Fix audit crash due to save/restore PPR changes
        powerpc: fix compiling CONFIG_PPC_TRANSACTIONAL_MEM when CONFIG_ALTIVEC=n
      de0024b6
    • L
      Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · c208278c
      Linus Torvalds 提交于
      Pull kbuild fix from Michal Marek:
       "Fix for a missing dependency when generating scripts/mod/devicetable-offsets.h.
        This dependency got introduced in v3.9-rc1."
      
      * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        kbuild: generate generic headers before recursing into scripts
      c208278c
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 8665ffc9
      Linus Torvalds 提交于
      Pull input fixes from Dmitry Torokhov:
       "Two small fixups to the Wacom driver"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: wacom - correct reported resolution for Intuos4 Wireless
        Input: wacom - fix "can not retrieve extra class descriptor" for 24HDT
      8665ffc9
    • M
      Merge branch 'kvm-arm-fixes-3.9' of git://github.com/columbia/linux-kvm-arm · 23125c40
      Marcelo Tosatti 提交于
      * 'kvm-arm-fixes-3.9' of git://github.com/columbia/linux-kvm-arm:
        ARM: KVM: fix L_PTE_S2_RDWR to actually be Read/Write
        ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      23125c40
    • L
      vm: add vm_iomap_memory() helper function · b4cbb197
      Linus Torvalds 提交于
      Various drivers end up replicating the code to mmap() their memory
      buffers into user space, and our core memory remapping function may be
      very flexible but it is unnecessarily complicated for the common cases
      to use.
      
      Our internal VM uses pfn's ("page frame numbers") which simplifies
      things for the VM, and allows us to pass physical addresses around in a
      denser and more efficient format than passing a "phys_addr_t" around,
      and having to shift it up and down by the page size.  But it just means
      that drivers end up doing that shifting instead at the interface level.
      
      It also means that drivers end up mucking around with internal VM things
      like the vma details (vm_pgoff, vm_start/end) way more than they really
      need to.
      
      So this just exports a function to map a certain physical memory range
      into user space (using a phys_addr_t based interface that is much more
      natural for a driver) and hides all the complexity from the driver.
      Some drivers will still end up tweaking the vm_page_prot details for
      things like prefetching or cacheability etc, but that's actually
      relevant to the driver, rather than caring about what the page offset of
      the mapping is into the particular IO memory region.
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4cbb197
    • M
      ARM: KVM: fix L_PTE_S2_RDWR to actually be Read/Write · 865499ea
      Marc Zyngier 提交于
      Looks like our L_PTE_S2_RDWR definition is slightly wrong,
      and is actually write only (see ARM ARM Table B3-9, Stage 2 control
      of access permissions). Didn't make a difference for normal pages,
      as we OR the flags together, but I'm still wondering how it worked
      for Stage-2 mapped devices, such as the GIC.
      
      Brown paper bag time, again.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <cdall@cs.columbia.edu>
      865499ea
    • M
      ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting · ca46e10f
      Marc Zyngier 提交于
      Commit 3401d546 (KVM: ARM: Introduce KVM_ARM_SET_DEVICE_ADDR
      ioctl) added support for the KVM_CAP_ARM_SET_DEVICE_ADDR capability,
      but failed to add a break in the relevant case statement, returning
      the number of CPUs instead.
      
      Luckilly enough, the CONFIG_NR_CPUS=0 patch hasn't been merged yet
      (https://lkml.org/lkml/diff/2012/3/31/131/1), so the bug wasn't
      noticed.
      
      Just give it a break!
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <cdall@cs.columbia.edu>
      ca46e10f
    • L
      net: fec: fix regression in link change accounting · 8d7ed0f0
      Lucas Stach 提交于
      A link-down isn't properly saved in the FEC state, so we wouldn't restart the
      FEC after a repeated link-up.
      
      Regression was introduced with commit
      d97e7497 "net: fec: restart the FEC when PHY speed changes"
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Tested-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d7ed0f0
    • B
      net: cdc_mbim: remove bogus sizeof() · 32b161aa
      Bjørn Mork 提交于
      The intention was to test against the constant, not the size of
      the constant.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32b161aa
  3. 16 4月, 2013 5 次提交
  4. 15 4月, 2013 14 次提交
  5. 14 4月, 2013 4 次提交
    • N
      watchdog: Revert the AT91RM9200_WATCHDOG dependency · 09549cd0
      Nicolas Ferre 提交于
      Compiling the at91rm9200_wdt.c driver without at91rm9200
      support was leading to several errors:
      
      drivers/built-in.o: In function `at91_wdt_close':
      at91_adc.c:(.text+0xc9fe4): undefined reference to `at91_st_base'
      drivers/built-in.o: In function `at91_wdt_write':
      at91_adc.c:(.text+0xca004): undefined reference to `at91_st_base'
      drivers/built-in.o: In function `at91wdt_shutdown':
      at91_adc.c:(.text+0xca01c): undefined reference to `at91_st_base'
      drivers/built-in.o: In function `at91wdt_suspend':
      at91_adc.c:(.text+0xca038): undefined reference to `at91_st_base'
      drivers/built-in.o: In function `at91_wdt_open':
      at91_adc.c:(.text+0xca0cc): undefined reference to `at91_st_base'
      drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references to
      `at91_st_base' follow
      
      So, reverting the modification of the "depends" Kconfig line
      introduced by patch a6a1bcd3 (watchdog: at91rm9200: add DT support)
      seems to be the good solution.
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      09549cd0
    • S
      vfs: Revert spurious fix to spinning prevention in prune_icache_sb · 5b55d708
      Suleiman Souhlal 提交于
      Revert commit 62a3ddef ("vfs: fix spinning prevention in prune_icache_sb").
      
      This commit doesn't look right: since we are looking at the tail of the
      list (sb->s_inode_lru.prev) if we want to skip an inode, we should put
      it back at the head of the list instead of the tail, otherwise we will
      keep spinning on it.
      
      Discovered when investigating why prune_icache_sb came top in perf
      reports of a swapping load.
      Signed-off-by: NSuleiman Souhlal <suleiman@google.com>
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: stable@vger.kernel.org # v3.2+
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5b55d708
    • L
      kobject: fix kset_find_obj() race with concurrent last kobject_put() · a49b7e82
      Linus Torvalds 提交于
      Anatol Pomozov identified a race condition that hits module unloading
      and re-loading.  To quote Anatol:
      
       "This is a race codition that exists between kset_find_obj() and
        kobject_put().  kset_find_obj() might return kobject that has refcount
        equal to 0 if this kobject is freeing by kobject_put() in other
        thread.
      
        Here is timeline for the crash in case if kset_find_obj() searches for
        an object tht nobody holds and other thread is doing kobject_put() on
        the same kobject:
      
          THREAD A (calls kset_find_obj())     THREAD B (calls kobject_put())
          splin_lock()
                                               atomic_dec_return(kobj->kref), counter gets zero here
                                               ... starts kobject cleanup ....
                                               spin_lock() // WAIT thread A in kobj_kset_leave()
          iterate over kset->list
          atomic_inc(kobj->kref) (counter becomes 1)
          spin_unlock()
                                               spin_lock() // taken
                                               // it does not know that thread A increased counter so it
                                               remove obj from list
                                               spin_unlock()
                                               vfree(module) // frees module object with containing kobj
      
          // kobj points to freed memory area!!
          kobject_put(kobj) // OOPS!!!!
      
        The race above happens because module.c tries to use kset_find_obj()
        when somebody unloads module.  The module.c code was introduced in
        commit 6494a93d"
      
      Anatol supplied a patch specific for module.c that worked around the
      problem by simply not using kset_find_obj() at all, but rather than make
      a local band-aid, this just fixes kset_find_obj() to be thread-safe
      using the proper model of refusing the get a new reference if the
      refcount has already dropped to zero.
      
      See examples of this proper refcount handling not only in the kref
      documentation, but in various other equivalent uses of this pattern by
      grepping for atomic_inc_not_zero().
      
      [ Side note: the module race does indicate that module loading and
        unloading is not properly serialized wrt sysfs information using the
        module mutex.  That may require further thought, but this is the
        correct fix at the kobject layer regardless. ]
      Reported-analyzed-and-tested-by: NAnatol Pomozov <anatol.pomozov@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a49b7e82
    • T
      net: mvmdio: add select PHYLIB · 2e0cbf2c
      Thomas Petazzoni 提交于
      The mvmdio driver uses the phylib API, so it should select the PHYLIB
      symbol, otherwise, a build with mvmdio (but without mvneta) fails to
      build with undefined symbols such as mdiobus_unregister, mdiobus_free,
      etc.
      
      The mvneta driver does not use the phylib API directly, so it does not
      need to select PHYLIB. It already selects the mvmdio driver anyway.
      
      Historically, this problem is due to the fact that the PHY handling
      was originally part of mvneta, and was later moved to a separate
      driver, without updating the Kconfig select statements
      accordingly. And since there was no functional reason to use mvmdio
      without mvneta, this case was not tested.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e0cbf2c
  6. 13 4月, 2013 1 次提交
    • J
      Btrfs: make sure nbytes are right after log replay · 4bc4bee4
      Josef Bacik 提交于
      While trying to track down a tree log replay bug I noticed that fsck was always
      complaining about nbytes not being right for our fsynced file.  That is because
      the new fsync stuff doesn't wait for ordered extents to complete, so the inodes
      nbytes are not necessarily updated properly when we log it.  So to fix this we
      need to set nbytes to whatever it is on the inode that is on disk, so when we
      replay the extents we can just add the bytes that are being added as we replay
      the extent.  This makes it work for the case that we have the wrong nbytes or
      the case that we logged everything and nbytes is actually correct.  With this
      I'm no longer getting nbytes errors out of btrfsck.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      4bc4bee4