Skip to content
  1. May 16, 2012
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · d0cad88d
      David S. Miller authored
      
      
      John Linville says:
      
      Here are three more fixes that some of my developers are desperate to
      see included in 3.4...
      
      Johan Hedberg went to some length justifyng the inclusion of these two
      Bluetooth fixes:
      
      "The device_connected fix should be quite self-explanatory, but it's
      actually a wider issue than just for keyboards. All profiles that do
      incoming connection authorization (e.g. headsets) will break without it
      with specific hardware. The reason it wasn't caught earlier is that it
      only occurs with specific Bluetooth adapters.
      
      As for the security level patch, this fixes L2CAP socket based security
      level elevation during a connection. The HID profile needs this (for
      keyboards) and it is the only way to achieve the security level
      elevation when using the management interface to talk to the kernel
      (hence the management enabling patch being the one that exposes this"
      
      The rtlwifi fix addresses a regression related to firmware loading,
      as described in kernel.org bug 43187.  It basically just moves a hunk
      of code to a more appropriate place.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0cad88d
    • John W. Linville's avatar
      Merge branch 'master' of... · 60374631
      John W. Linville authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      60374631
    • Eric Dumazet's avatar
      pch_gbe: fix transmit races · 3ab77bf2
      Eric Dumazet authored
      
      
      Andy reported pch_gbe triggered "NETDEV WATCHDOG" errors.
      
      May 11 11:06:09 kontron kernel: WARNING: at net/sched/sch_generic.c:261
      dev_watchdog+0x1ec/0x200() (Not tainted)
      May 11 11:06:09 kontron kernel: Hardware name: N/A
      May 11 11:06:09 kontron kernel: NETDEV WATCHDOG: eth0 (pch_gbe):
      transmit queue 0 timed out
      
      It seems pch_gbe has a racy tx path (races with TX completion path)
      
      Remove tx_queue_lock lock since it has no purpose, we must use tx_lock
      instead.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarAndy Cress <andy.cress@us.kontron.com>
      Tested-by: default avatarAndy Cress <andy.cress@us.kontron.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ab77bf2
    • Dan Williams's avatar
      cdc_ether: add Novatel USB551L device IDs for FLAG_WWAN · 4e6304b8
      Dan Williams authored
      
      
      Needs to be tagged with FLAG_WWAN, which since it has generic
      descriptors, won't happen if we don't override the generic
      driver info.
      
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Acked-by: default avatarOliver Neukum <oliver@neukum.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e6304b8
    • Ming Lei's avatar
      usbnet: fix skb traversing races during unlink(v2) · 5b6e9bcd
      Ming Lei authored
      Commit 4231d47e
      
      (net/usbnet: avoid
      recursive locking in usbnet_stop()) fixes the recursive locking
      problem by releasing the skb queue lock before unlink, but may
      cause skb traversing races:
      	- after URB is unlinked and the queue lock is released,
      	the refered skb and skb->next may be moved to done queue,
      	even be released
      	- in skb_queue_walk_safe, the next skb is still obtained
      	by next pointer of the last skb
      	- so maybe trigger oops or other problems
      
      This patch extends the usage of entry->state to describe 'start_unlink'
      state, so always holding the queue(rx/tx) lock to change the state if
      the referd skb is in rx or tx queue because we need to know if the
      refered urb has been started unlinking in unlink_urbs.
      
      The other part of this patch is based on Huajun's patch:
      always traverse from head of the tx/rx queue to get skb which is
      to be unlinked but not been started unlinking.
      
      Signed-off-by: default avatarHuajun Li <huajun.li.lee@gmail.com>
      Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b6e9bcd
  2. May 15, 2012
  3. May 14, 2012
  4. May 13, 2012
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · cf00c55e
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of minor qla and virto fixes plus one major regression
        fix (oops in all legacy host drivers)."
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] virtio_scsi: fix TMF use-after-free
        [SCSI] fix oops in all legacy host adapters caused by 6f381fa3
        [SCSI] qla2xxx: Update version number to 8.04.00.03-k.
        [SCSI] qla2xxx: Properly check for current state after the fabric-login request.
        [SCSI] qla2xxx: Proper completion to scsi-ml for scsi status task_set_full and busy.
        [SCSI] qla2xxx: Block flash access from application when device is initialized for ISP82xx.
        [SCSI] qla2xxx: Fix reset time out as qla2xxx not ack to reset request.
      cf00c55e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 4a873f53
      Linus Torvalds authored
      Pull networking fixes from David S. Miller:
      
       1) Since we do RCU lookups on ipv4 FIB entries, we have to test if the
          entry is dead before returning it to our caller.
      
       2) openvswitch locking and packet validation fixes from Ansis Atteka,
          Jesse Gross, and Pravin B Shelar.
      
       3) Fix PM resume locking in IGB driver, from Benjamin Poirier.
      
       4) Fix VLAN header handling in vhost-net and macvtap, from Basil Gor.
      
       5) Revert a bogus network namespace isolation change that was causing
          regressions on S390 networking devices.
      
       6) If bonding decides to process and handle a LACPDU frame, we
          shouldn't bump the rx_dropped counter.  From Jiri Bohac.
      
       7) Fix mis-calculation of available TX space in r8169 driver when doing
          TSO, which can lead to crashes and/or hung device.  From Julien
          Ducourthial.
      
       8) SCTP does not validate cached routes properly in all cases, from
          Nicolas Dichtel.
      
       9) Link status interrupt needs to be handled in ks8851 driver, from
          Stephen Boyd.
      
      10) Use capable(), not cap_raised(), in connector/userns netlink code.
          From Eric W. Biederman via Andrew Morton.
      
      11) Fix pktgen OOPS on module unload, from Eric Dumazet.
      
      12) iwlwifi under-estimates SKB truesizes, also from Eric Dumazet.
      
      13) Cure division by zero in SFC driver, from Ben Hutchings.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits)
        ks8851: Update link status during link change interrupt
        macvtap: restore vlan header on user read
        vhost-net: fix handle_rx buffer size
        bonding: don't increase rx_dropped after processing LACPDUs
        connector/userns: replace netlink uses of cap_raised() with capable()
        sctp: check cached dst before using it
        pktgen: fix crash at module unload
        Revert "net: maintain namespace isolation between vlan and real device"
        ehea: fix losing of NEQ events when one event occurred early
        igb: fix rtnl race in PM resume path
        ipv4: Do not use dead fib_info entries.
        r8169: fix unsigned int wraparound with TSO
        sfc: Fix division by zero when using one RX channel and no SR-IOV
        openvswitch: Validation of IPv6 set port action uses IPv4 header
        net: compare_ether_addr[_64bits]() has no ordering
        cdc_ether: Ignore bogus union descriptor for RNDIS devices
        bnx2x: bug fix when loading after SAN boot
        e1000: Silence sparse warnings by correcting type
        igb, ixgbe: netdev_tx_reset_queue incorrectly called from tx init path
        openvswitch: Release rtnl_lock if ovs_vport_cmd_build_info() failed.
        ...
      4a873f53
    • Linus Torvalds's avatar
      Merge tag 'dm-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm · 2eb42967
      Linus Torvalds authored
      Pull device-mapper fixes from Alasdair G Kergon:
       "Fix a couple of serious memory leaks in device-mapper thin
        provisioning and tidy its MODULE_DESCRIPTION.
      
        Mitigate occasional reported hangs associated with multipath scsi_dh
        module loading."
      
      * tag 'dm-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
        dm mpath: check if scsi_dh module already loaded before trying to load
        dm thin: correct module description
        dm thin: fix unprotected use of prepared_discards list
        dm thin: reinstate missing mempool_free in cell_release_singleton
      2eb42967
    • Rafael J. Wysocki's avatar
      MAINTAINERS: Add myself as the cpufreq maintainer · a6c072c7
      Rafael J. Wysocki authored
      
      
      Since cpufreq has no official maintainer at the moment, I'm willing
      to maintain it along some other power management core code I've been
      maintaining already.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a6c072c7
  5. May 12, 2012
  6. May 11, 2012
    • Jiri Bohac's avatar
      bonding: don't increase rx_dropped after processing LACPDUs · 13a8e0c8
      Jiri Bohac authored
      Since commit 3aba891d
      
      , bonding processes LACP frames (802.3ad
      mode) with bond_handle_frame(). Currently a copy of the skb is
      made and the original is left to be processed by other
      rx_handlers and the rest of the network stack by returning
      RX_HANDLER_ANOTHER.  As there is no protocol handler for
      PKT_TYPE_LACPDU, the frame is dropped and dev->rx_dropped
      increased.
      
      Fix this by making bond_handle_frame() return RX_HANDLER_CONSUMED
      if bonding has processed the LACP frame.
      
      Signed-off-by: default avatarJiri Bohac <jbohac@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13a8e0c8
    • Eric W. Biederman's avatar
      connector/userns: replace netlink uses of cap_raised() with capable() · 38bf1953
      Eric W. Biederman authored
      
      
      In 2009 Philip Reiser notied that a few users of netlink connector
      interface needed a capability check and added the idiom
      cap_raised(nsp->eff_cap, CAP_SYS_ADMIN) to a few of them, on the premise
      that netlink was asynchronous.
      
      In 2011 Patrick McHardy noticed we were being silly because netlink is
      synchronous and removed eff_cap from the netlink_skb_params and changed
      the idiom to cap_raised(current_cap(), CAP_SYS_ADMIN).
      
      Looking at those spots with a fresh eye we should be calling
      capable(CAP_SYS_ADMIN).  The only reason I can see for not calling capable
      is that it once appeared we were not in the same task as the caller which
      would have made calling capable() impossible.
      
      In the initial user_namespace the only difference between between
      cap_raised(current_cap(), CAP_SYS_ADMIN) and capable(CAP_SYS_ADMIN) are a
      few sanity checks and the fact that capable(CAP_SYS_ADMIN) sets
      PF_SUPERPRIV if we use the capability.
      
      Since we are going to be using root privilege setting PF_SUPERPRIV seems
      the right thing to do.
      
      The motivation for this that patch is that in a child user namespace
      cap_raised(current_cap(),...) tests your capabilities with respect to that
      child user namespace not capabilities in the initial user namespace and
      thus will allow processes that should be unprivielged to use the kernel
      services that are only protected with cap_raised(current_cap(),..).
      
      To fix possible user_namespace issues and to just clean up the code
      replace cap_raised(current_cap(), CAP_SYS_ADMIN) with
      capable(CAP_SYS_ADMIN).
      
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Philipp Reisner <philipp.reisner@linbit.com>
      Acked-by: default avatarSerge E. Hallyn <serge.hallyn@canonical.com>
      Acked-by: default avatarAndrew G. Morgan <morgan@kernel.org>
      Cc: Vasiliy Kulikov <segoon@openwall.com>
      Cc: David Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJames Morris <james.l.morris@oracle.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38bf1953
    • Nicolas Dichtel's avatar
      sctp: check cached dst before using it · e0268868
      Nicolas Dichtel authored
      
      
      dst_check() will take care of SA (and obsolete field), hence
      IPsec rekeying scenario is taken into account.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarVlad Yaseivch <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0268868
    • Eric Dumazet's avatar
      pktgen: fix crash at module unload · c57b5468
      Eric Dumazet authored
      commit 7d3d43da
      
       (net: In unregister_netdevice_notifier unregister
      the netdevices.) makes pktgen crashing at module unload.
      
      [  296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267
      [  296.820719]  lock: ffff880310c38000, .magic: ffff8803, .owner: <none>/-1, .owner_cpu: -1
      [  296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254
      [  296.821079] Call Trace:
      [  296.821211]  [<ffffffff8168a715>] spin_dump+0x8a/0x8f
      [  296.821345]  [<ffffffff8168a73b>] spin_bug+0x21/0x26
      [  296.821507]  [<ffffffff812b4741>] do_raw_spin_lock+0x131/0x140
      [  296.821648]  [<ffffffff8169188e>] _raw_spin_lock+0x1e/0x20
      [  296.821786]  [<ffffffffa00cc0fd>] __pktgen_NN_threads+0x4d/0x140 [pktgen]
      [  296.821928]  [<ffffffffa00ccf8d>] pktgen_device_event+0x10d/0x1e0 [pktgen]
      [  296.822073]  [<ffffffff8154ed4f>] unregister_netdevice_notifier+0x7f/0x100
      [  296.822216]  [<ffffffffa00d2a0b>] pg_cleanup+0x48/0x73 [pktgen]
      [  296.822357]  [<ffffffff8109528e>] sys_delete_module+0x17e/0x2a0
      [  296.822502]  [<ffffffff81699652>] system_call_fastpath+0x16/0x1b
      
      Hold the pktgen_thread_lock while splicing pktgen_threads, and test
      pktgen_exiting in pktgen_device_event() to make unload faster.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c57b5468
    • David S. Miller's avatar
      Revert "net: maintain namespace isolation between vlan and real device" · 59b9997b
      David S. Miller authored
      This reverts commit 8a83a00b
      
      .
      
      It causes regressions for S390 devices, because it does an
      unconditional DST drop on SKBs for vlans and the QETH device
      needs the neighbour entry hung off the DST for certain things
      on transmit.
      
      Arnd can't remember exactly why he even needed this change.
      
      Conflicts:
      
      	drivers/net/macvlan.c
      	net/8021q/vlan_dev.c
      	net/core/dev.c
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59b9997b
    • Thadeu Lima de Souza Cascardo's avatar
      ehea: fix losing of NEQ events when one event occurred early · 380ec964
      Thadeu Lima de Souza Cascardo authored
      
      
      The NEQ interrupt is only triggered when there was no previous pending
      interrupt. If we request irq handling after an interrupt has occurred,
      we will never get an interrupt until we call H_RESET_EVENTS.
      
      Events seem to be cleared when we first register the NEQ. So, when we
      requested irq handling right after registering it, a possible race with
      an interrupt was much less likely. Now, there is a chance we may lose
      this race and never get any events.
      
      The fix here is to poll and acknowledge any events that might have
      happened right after registering the irq handler.
      
      Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      380ec964
    • Benjamin Poirier's avatar
      igb: fix rtnl race in PM resume path · cfb8c3aa
      Benjamin Poirier authored
      
      
      Since the caller (PM resume code) is not the one holding rtnl, when taking the
      'else' branch rtnl may be released at any moment, thereby defeating the whole
      purpose of this code block.
      
      Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.de>
      Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfb8c3aa
    • David S. Miller's avatar
      ipv4: Do not use dead fib_info entries. · dccd9ecc
      David S. Miller authored
      
      
      Due to RCU lookups and RCU based release, fib_info objects can
      be found during lookup which have fi->fib_dead set.
      
      We must ignore these entries, otherwise we risk dereferencing
      the parts of the entry which are being torn down.
      
      Reported-by: default avatarYevgen Pronenko <yevgen.pronenko@sonymobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dccd9ecc
    • Linus Torvalds's avatar
      Merge branch 'parisc' (PA-RISC compile fixes) · d60b9c16
      Linus Torvalds authored
      Merge PA-RISC compile fixes from Rolf Eike Beer:
       "Since commit d66acc39 ("bitops: Optimise get_order()") getorder.h
        includes log2.h which leads to an include loop on PA-RISC, bringing a
        bunch of other breakage to light.  This patchset fixes the compilation
        of the current state of 3.4 on HPPA.
      
        Unchanged against the first version, just added an Ack by Grant."
      
      * emailed from Rolf Eike Beer <eike-kernel@sf-tec.de>: (5 patches)
        parisc: move definition of PAGE0 to asm/page.h
        parisc: add missing include of asm/page.h to asm/pgtable.h
        parisc: drop include of asm/pdc.h from asm/hardware.h
        parisc: add missing forward declarations in asm/hardware.h
        parisc: add missing includes in asm/spinlock.h
      d60b9c16
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch-bomb) · 7c283324
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton.
      
      * emailed from Andrew Morton <akpm@linux-foundation.org>: (8 patches)
        MAINTAINERS: add maintainer for LED subsystem
        mm: nobootmem: fix sign extend problem in __free_pages_memory()
        drivers/leds: correct __devexit annotations
        memcg: free spare array to avoid memory leak
        namespaces, pid_ns: fix leakage on fork() failure
        hugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow()
        mm: fix division by 0 in percpu_pagelist_fraction()
        proc/pid/pagemap: correctly report non-present ptes and holes between vmas
      7c283324
    • Rolf Eike Beer's avatar
      parisc: move definition of PAGE0 to asm/page.h · 4a8a0788
      Rolf Eike Beer authored
      
      
      This was defined in asm/pdc.h which needs to include asm/page.h for
      __PAGE_OFFSET. This leads to an include loop so that page.h eventually will
      include pdc.h again. While this is no problem because of header guards, it is
      a problem because some symbols may be undefined. Such an error is this:
      
      In file included from include/linux/bitops.h:35:0,
                       from include/asm-generic/getorder.h:7,
                       from arch/parisc/include/asm/page.h:162,
                       from arch/parisc/include/asm/pdc.h:346,
                       from arch/parisc/include/asm/processor.h:16,
                       from arch/parisc/include/asm/spinlock.h:6,
                       from arch/parisc/include/asm/atomic.h:20,
                       from include/linux/atomic.h:4,
                       from include/linux/sysfs.h:20,
                       from include/linux/kobject.h:21,
                       from include/linux/device.h:17,
                       from include/linux/eisa.h:5,
                       from arch/parisc/kernel/pci.c:11:
      arch/parisc/include/asm/bitops.h: In function ‘set_bit’:
      arch/parisc/include/asm/bitops.h:82:2: error: implicit declaration of function ‘_atomic_spin_lock_irqsave’ [-Werror=implicit-function-declaration]
      arch/parisc/include/asm/bitops.h:84:2: error: implicit declaration of function ‘_atomic_spin_unlock_irqrestore’ [-Werror=implicit-function-declaration]
      
      Signed-off-by: default avatarRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4a8a0788
    • Rolf Eike Beer's avatar
      parisc: add missing include of asm/page.h to asm/pgtable.h · 9b05b1ec
      Rolf Eike Beer authored
      
      
      Fixes these errors:
      
      In file included from arch/parisc/include/asm/io.h:5:0,
                       from include/linux/io.h:22,
                       from include/linux/pci.h:54,
                       from arch/parisc/kernel/setup.c:35:
      arch/parisc/include/asm/pgtable.h:92:6: warning: "PAGE_SHIFT" is not defined [-Wundef]
      arch/parisc/include/asm/pgtable.h:92:6: warning: "PAGE_SHIFT" is not defined [-Wundef]
      arch/parisc/include/asm/pgtable.h:92:6: warning: "BITS_PER_PTE_ENTRY" is not defined [-Wundef]
      
      Signed-off-by: default avatarRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9b05b1ec