1. 18 Oct, 2014 23 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20141015' of git://git.infradead.org/linux-mtd · 511c41d9
      Linus Torvalds authored
      Pull MTD update from Brian Norris:
       "Sorry for delaying this a bit later than usual.  There's one mild
        regression from 3.16 that was noticed during the 3.17 cycle, and I
        meant to send a fix for it along with this pull request.  I'll
        probably try to queue it up for a later pull request once I've had a
        better look at it, hopefully by -rc2 at the latest.
      
        Summary for this pull:
      
        NAND
         - Cleanup for Denali driver
         - Atmel: add support for new page sizes
         - Atmel: fix up 'raw' mode support
         - Atmel: miscellaneous cleanups
         - New timing mode helpers for non-ONFI NAND
         - OMAP: allow driver to be (properly) built as a module
         - bcm47xx: RESET support and other cleanups
      
        SPI NOR
         - Miscellaneous cleanups, to prepare framework for wider use (some
           further work still pending)
         - Compile-time configuration to select 4K vs.  64K support for flash
           that support both (necessary for using UBIFS on some SPI NOR)
      
        A few scattered code quality fixes, detected by Coverity
      
        See the changesets for more"
      
      * tag 'for-linus-20141015' of git://git.infradead.org/linux-mtd: (59 commits)
        mtd: nand: omap: Correct CONFIG_MTD_NAND_OMAP_BCH help message
        mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module
        mtd: move support for struct flash_platform_data into m25p80
        mtd: spi-nor: add Kconfig option to disable 4K sectors
        mtd: nand: Move ELM driver and rename as omap_elm
        nand: omap2: Replace pr_err with dev_err
        nand: omap2: Remove horrible ifdefs to fix module probe
        mtd: nand: add Hynix's H27UCG8T2ATR-BC to nand_ids table
        mtd: nand: support ONFI timing mode retrieval for non-ONFI NANDs
        mtd: physmap_of: Add non-obsolete map_rom probe
        mtd: physmap_of: Fix ROM support via OF
        MAINTAINERS: add l2-mtd.git, 'next' tree for MTD
        mtd: denali: fix indents and other trivial things
        mtd: denali: remove unnecessary parentheses
        mtd: denali: remove another set-but-unused variable
        mtd: denali: fix include guard and license block of denali.h
        mtd: nand: don't break long print messages
        mtd: bcm47xxnflash: replace some magic numbers
        mtd: bcm47xxnflash: NAND_CMD_RESET support
        mtd: bcm47xxnflash: add cmd_ctrl handler
        ...
      511c41d9
    • Linus Torvalds's avatar
      Merge tag 'md/3.18' of git://neil.brown.name/md · 88ed806a
      Linus Torvalds authored
      Pull md updates from Neil Brown:
       - a few minor bug fixes
       - quite a lot of code tidy-up and simplification
       - remove PRINT_RAID_DEBUG ioctl.  I'm fairly sure it is unused, and it
         isn't particularly useful.
      
      * tag 'md/3.18' of git://neil.brown.name/md: (21 commits)
        lib/raid6: Add log level to printks
        md: move EXPORT_SYMBOL to after function in md.c
        md: discard PRINT_RAID_DEBUG ioctl
        md: remove MD_BUG()
        md: clean up 'exit' labels in md_ioctl().
        md: remove unnecessary test for MD_MAJOR in md_ioctl()
        md: don't allow "-sync" to be set for device in an active array.
        md: remove unwanted white space from md.c
        md: don't start resync thread directly from md thread.
        md: Just use RCU when checking for overlap between arrays.
        md: avoid potential long delay under pers_lock
        md: simplify export_array()
        md: discard find_rdev_nr in favour of find_rdev_nr_rcu
        md: use wait_event() to simplify md_super_wait()
        md: be more relaxed about stopping an array which isn't started.
        md/raid1: process_checks doesn't use its return value.
        md/raid5: fix init_stripe() inconsistencies
        md/raid10: another memory leak due to reshape.
        md: use set_bit/clear_bit instead of shift/mask for bi_flags changes.
        md/raid1: minor typos and reformatting.
        ...
      88ed806a
    • Linus Torvalds's avatar
      Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · e56d9fcc
      Linus Torvalds authored
      Pull selinux fix from James Morris:
       "Fix for a list corruption bug in the SELinux code"
      
      * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        selinux: fix inode security list corruption
      e56d9fcc
    • Linus Torvalds's avatar
      Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 0e6e58f9
      Linus Torvalds authored
      Pull virtio updates from Rusty Russell:
       "One cc: stable commit, the rest are a series of minor cleanups which
        have been sitting in MST's tree during my vacation.  I changed a
        function name and made one trivial change, then they spent two days in
        linux-next"
      
      * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (25 commits)
        virtio-rng: refactor probe error handling
        virtio_scsi: drop scan callback
        virtio_balloon: enable VQs early on restore
        virtio_scsi: fix race on device removal
        virito_scsi: use freezable WQ for events
        virtio_net: enable VQs early on restore
        virtio_console: enable VQs early on restore
        virtio_scsi: enable VQs early on restore
        virtio_blk: enable VQs early on restore
        virtio_scsi: move kick event out from virtscsi_init
        virtio_net: fix use after free on allocation failure
        9p/trans_virtio: enable VQs early
        virtio_console: enable VQs early
        virtio_blk: enable VQs early
        virtio_net: enable VQs early
        virtio: add API to enable VQs early
        virtio_net: minor cleanup
        virtio-net: drop config_mutex
        virtio_net: drop config_enable
        virtio-blk: drop config_mutex
        ...
      0e6e58f9
    • Linus Torvalds's avatar
      Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 50edb5cc
      Linus Torvalds authored
      Pull module fix from Rusty Russell:
       "A single panic fix for a rare race, stable CC'd"
      
      * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        modules, lock around setting of MODULE_STATE_UNFORMED
      50edb5cc
    • Jonathan Corbet's avatar
      MAINTAINERS: Become the docs maintainer · ad3118b9
      Jonathan Corbet authored
      It seems it's my turn to be the documentation maintainer for a bit.  My
      plan is to work to ensure that docs patches don't fall through the cracks;
      I assume most changes will continue to flow through subsystem-specific
      trees.
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ad3118b9
    • Andy Lutomirski's avatar
      x86,kvm,vmx: Preserve CR4 across VM entry · d974baa3
      Andy Lutomirski authored
      CR4 isn't constant; at least the TSD and PCE bits can vary.
      
      TBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks
      like it's correct.
      
      This adds a branch and a read from cr4 to each vm entry.  Because it is
      extremely likely that consecutive entries into the same vcpu will have
      the same host cr4 value, this fixes up the vmcs instead of restoring cr4
      after the fact.  A subsequent patch will add a kernel-wide cr4 shadow,
      reducing the overhead in the common case to just two memory reads and a
      branch.
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Cc: stable@vger.kernel.org
      Cc: Petr Matousek <pmatouse@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d974baa3
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2e923b02
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Include fixes for netrom and dsa (Fabian Frederick and Florian
          Fainelli)
      
       2) Fix FIXED_PHY support in stmmac, from Giuseppe CAVALLARO.
      
       3) Several SKB use after free fixes (vxlan, openvswitch, vxlan,
          ip_tunnel, fou), from Li ROngQing.
      
       4) fec driver PTP support fixes from Luwei Zhou and Nimrod Andy.
      
       5) Use after free in virtio_net, from Michael S Tsirkin.
      
       6) Fix flow mask handling for megaflows in openvswitch, from Pravin B
          Shelar.
      
       7) ISDN gigaset and capi bug fixes from Tilman Schmidt.
      
       8) Fix route leak in ip_send_unicast_reply(), from Vasily Averin.
      
       9) Fix two eBPF JIT bugs on x86, from Alexei Starovoitov.
      
      10) TCP_SKB_CB() reorganization caused a few regressions, fixed by Cong
          Wang and Eric Dumazet.
      
      11) Don't overwrite end of SKB when parsing malformed sctp ASCONF
          chunks, from Daniel Borkmann.
      
      12) Don't call sock_kfree_s() with NULL pointers, this function also has
          the side effect of adjusting the socket memory usage.  From Cong Wang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits)
        bna: fix skb->truesize underestimation
        net: dsa: add includes for ethtool and phy_fixed definitions
        openvswitch: Set flow-key members.
        netrom: use linux/uaccess.h
        dsa: Fix conversion from host device to mii bus
        tipc: fix bug in bundled buffer reception
        ipv6: introduce tcp_v6_iif()
        sfc: add support for skb->xmit_more
        r8152: return -EBUSY for runtime suspend
        ipv4: fix a potential use after free in fou.c
        ipv4: fix a potential use after free in ip_tunnel_core.c
        hyperv: Add handling of IP header with option field in netvsc_set_hash()
        openvswitch: Create right mask with disabled megaflows
        vxlan: fix a free after use
        openvswitch: fix a use after free
        ipv4: dst_entry leak in ip_send_unicast_reply()
        ipv4: clean up cookie_v4_check()
        ipv4: share tcp_v4_save_options() with cookie_v4_check()
        ipv4: call __ip_options_echo() in cookie_v4_check()
        atm: simplify lanai.c by using module_pci_driver
        ...
      2e923b02
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · ffd8221b
      Linus Torvalds authored
      Pull Sparc bugfix from David Miller:
       "Sparc64 AES ctr mode bug fix"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix FPU register corruption with AES crypto offload.
      ffd8221b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · e0a9272c
      Linus Torvalds authored
      Pull IDE cleanup from David Miller:
       "One IDE driver cleanup"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        Drivers: ide: Remove typedef atiixp_ide_timing
      e0a9272c
    • Catalin Marinas's avatar
      futex: Ensure get_futex_key_refs() always implies a barrier · 76835b0e
      Catalin Marinas authored
      Commit b0c29f79 (futexes: Avoid taking the hb->lock if there's
      nothing to wake up) changes the futex code to avoid taking a lock when
      there are no waiters. This code has been subsequently fixed in commit
      11d4616b (futex: revert back to the explicit waiter counting code).
      Both the original commit and the fix-up rely on get_futex_key_refs() to
      always imply a barrier.
      
      However, for private futexes, none of the cases in the switch statement
      of get_futex_key_refs() would be hit and the function completes without
      a memory barrier as required before checking the "waiters" in
      futex_wake() -> hb_waiters_pending(). The consequence is a race with a
      thread waiting on a futex on another CPU, allowing the waker thread to
      read "waiters == 0" while the waiter thread to have read "futex_val ==
      locked" (in kernel).
      
      Without this fix, the problem (user space deadlocks) can be seen with
      Android bionic's mutex implementation on an arm64 multi-cluster system.
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reported-by: default avatarMatteo Franchin <Matteo.Franchin@arm.com>
      Fixes: b0c29f79 (futexes: Avoid taking the hb->lock if there's nothing to wake up)
      Acked-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
      Tested-by: default avatarMike Galbraith <umgwanakikbuti@gmail.com>
      Cc: <stable@vger.kernel.org>
      Cc: Darren Hart <dvhart@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      76835b0e
    • Eric Dumazet's avatar
      bna: fix skb->truesize underestimation · f2d9da1a
      Eric Dumazet authored
      skb->truesize is not meant to be tracking amount of used bytes
      in an skb, but amount of reserved/consumed bytes in memory.
      
      For instance, if we use a single byte in last page fragment,
      we have to account the full size of the fragment.
      
      skb->truesize can be very different from skb->len, that has
      a very specific safety purpose.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Rasesh Mody <rasesh.mody@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f2d9da1a
    • Florian Fainelli's avatar
      net: dsa: add includes for ethtool and phy_fixed definitions · a2820543
      Florian Fainelli authored
      net/dsa/slave.c uses functions and structures declared in phy_fixed.h
      but does not explicitely include it, while dsa.h needs structure
      declarations for 'struct ethtool_wolinfo' and 'struct ethtool_eee', fix
      those by including the correct header files.
      
      Fixes: ec9436ba ("net: dsa: allow drivers to do link adjustment")
      Fixes: ce31b31c ("net: dsa: allow updating fixed PHY link information")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2820543
    • Pravin B Shelar's avatar
      openvswitch: Set flow-key members. · 25ef1328
      Pravin B Shelar authored
      This patch adds missing memset which are required to initialize
      flow key member. For example for IP flow we need to initialize
      ip.frag for all cases.
      
      Found by inspection.
      
      This bug is introduced by commit 07148121
      ("openvswitch: Eliminate memset() from flow_extract").
      Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25ef1328
    • Fabian Frederick's avatar
      netrom: use linux/uaccess.h · dc8e5416
      Fabian Frederick authored
      replace asm/uaccess.h by linux/uaccess.h
      Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc8e5416
    • Guenter Roeck's avatar
      dsa: Fix conversion from host device to mii bus · b184e497
      Guenter Roeck authored
      Commit b4d2394d ("dsa: Replace mii_bus with a generic host device")
      replaces mii_bus with a generic host_dev, and introduces
      dsa_host_dev_to_mii_bus() to support conversion from host_dev to mii_bus.
      However, in some cases it uses to_mii_bus to perform that conversion.
      Since host_dev is not the phy bus device but typically a platform device,
      this fails and results in a crash with the affected drivers.
      
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffff81781d35>] __mutex_lock_slowpath+0x75/0x100
      PGD 406783067 PUD 406784067 PMD 0
      Oops: 0002 [#1] SMP
      ...
      Call Trace:
      [<ffffffff810a538b>] ? pick_next_task_fair+0x61b/0x880
      [<ffffffff81781de3>] mutex_lock+0x23/0x37
      [<ffffffff81533244>] mdiobus_read+0x34/0x60
      [<ffffffff8153b95a>] __mv88e6xxx_reg_read+0x8a/0xa0
      [<ffffffff8153b9bc>] mv88e6xxx_reg_read+0x4c/0xa0
      
      Fixes: b4d2394d ("dsa: Replace mii_bus with a generic host device")
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b184e497
    • Jon Paul Maloy's avatar
      tipc: fix bug in bundled buffer reception · 643566d4
      Jon Paul Maloy authored
      In commit ec8a2e56 ("tipc: same receive
      code path for connection protocol and data messages") we omitted the
      the possiblilty that an arriving message extracted from a bundle buffer
      may be a multicast message. Such messages need to be to be delivered to
      the socket via a separate function, tipc_sk_mcast_rcv(). As a result,
      small multicast messages arriving as members of a bundle buffer will be
      silently dropped.
      
      This commit corrects the error by considering this case in the function
      tipc_link_bundle_rcv().
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      643566d4
    • Eric Dumazet's avatar
      ipv6: introduce tcp_v6_iif() · 870c3151
      Eric Dumazet authored
      Commit 971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line
      misses") added a regression for SO_BINDTODEVICE on IPv6.
      
      This is because we still use inet6_iif() which expects that IP6 control
      block is still at the beginning of skb->cb[]
      
      This patch adds tcp_v6_iif() helper and uses it where necessary.
      
      Because __inet6_lookup_skb() is used by TCP and DCCP, we add an iif
      parameter to it.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: 971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
      Acked-by: default avatarCong Wang <cwang@twopensource.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      870c3151
    • Edward Cree's avatar
      sfc: add support for skb->xmit_more · 70b33fb0
      Edward Cree authored
      Don't ring the doorbell, and don't do PIO.  This will also prevent
       TX Push, because there will be more than one buffer waiting when
       the doorbell is rung.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70b33fb0
    • hayeswang's avatar
      r8152: return -EBUSY for runtime suspend · 6cc69f2a
      hayeswang authored
      Remove calling cancel_delayed_work_sync() for runtime suspend,
      because it would cause dead lock. Instead, return -EBUSY to
      avoid the device enters suspending if the net is running and
      the delayed work is pending or running. The delayed work would
      try to wake up the device later, so the suspending is not
      necessary.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cc69f2a
    • Li RongQing's avatar
      ipv4: fix a potential use after free in fou.c · d8f00d27
      Li RongQing authored
      pskb_may_pull() maybe change skb->data and make uh pointer oboslete,
      so reload uh and guehdr
      
      Fixes: 37dd0247 ("gue: Receive side for Generic UDP Encapsulation")
      Cc: Tom Herbert <therbert@google.com>
      Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d8f00d27
    • Li RongQing's avatar
      ipv4: fix a potential use after free in ip_tunnel_core.c · 1245dfc8
      Li RongQing authored
      pskb_may_pull() maybe change skb->data and make eth pointer oboslete,
      so set eth after pskb_may_pull()
      
      Fixes:3d7b46cd("ip_tunnel: push generic protocol handling to ip_tunnel module")
      Cc: Pravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
      Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1245dfc8
    • Haiyang Zhang's avatar
      hyperv: Add handling of IP header with option field in netvsc_set_hash() · f88e6714
      Haiyang Zhang authored
      In case that the IP header has optional field at the end, this patch will
      get the port numbers after that field, and compute the hash. The general
      parser skb_flow_dissect() is used here.
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f88e6714
  2. 17 Oct, 2014 8 commits
  3. 16 Oct, 2014 9 commits