1. 02 8月, 2013 3 次提交
    • M
      ipv6: prevent fib6_run_gc() contention · 2ac3ac8f
      Michal Kubeček 提交于
      On a high-traffic router with many processors and many IPv6 dst
      entries, soft lockup in fib6_run_gc() can occur when number of
      entries reaches gc_thresh.
      
      This happens because fib6_run_gc() uses fib6_gc_lock to allow
      only one thread to run the garbage collector but ip6_dst_gc()
      doesn't update net->ipv6.ip6_rt_last_gc until fib6_run_gc()
      returns. On a system with many entries, this can take some time
      so that in the meantime, other threads pass the tests in
      ip6_dst_gc() (ip6_rt_last_gc is still not updated) and wait for
      the lock. They then have to run the garbage collector one after
      another which blocks them for quite long.
      
      Resolve this by replacing special value ~0UL of expire parameter
      to fib6_run_gc() by explicit "force" parameter to choose between
      spin_lock_bh() and spin_trylock_bh() and call fib6_run_gc() with
      force=false if gc_thresh is reached but not max_size.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ac3ac8f
    • D
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · 1f1059fc
      David S. Miller 提交于
      John W. Linville says:
      
      ====================
      This pull request is intended for the 3.11 stream.  It is a bit
      larger than usual, as it includes pulls from most of my feeder trees
      as well...
      
      For the Bluetooth bits, Gustavo says:
      
      "A few fixes and devices ID additions for 3.11:
      
       * There are 4 new ath3k device ids
       * Fixed stack memory usage in ath3k.
       * Fixed the init process of BlueFRITZ! devices, they were failing to init
         due to an unsupported command we sent.
       * Fixed wrong use of PTR_ERR in btusb code that was preventing intel devices
         to work properly.
       * Fixed race condition between hci_register_dev() and hci_dev_open() that
         could cause a NULL pointer dereference.
       * Fixed race condition that could call hci_req_cmd_complete() and make some
         devices to fail as showed in the log added to the commit message."
      
      Regarding the NFC bits, Samuel says:
      
      "We have:
      
      1) A build failure fix for the NCI SPI transport layer due to a
         missing CRC_CCITT Kconfig dependency.
      
      2) A netlink command rename: CMD_FW_UPLOAD was merged during the 3.11
         merge window but the typical terminology for loading a firmware to a
         target is firmware download rather than upload. In order to avoid any
         confusion in a file exported to userspace, we rename this command to
         CMD_FW_DOWNLOAD."
      
      Samuel's item #2 isn't strictly a fix, but it seems safe and should
      avoid confusion in the future.
      
      As for the mac80211 bits, Johannes says:
      
      "I only have three fixes this time, a fix for a suspend regression, a
      patch correcting the initiator in regulatory code and one fix for mesh
      station powersave."
      
      With respect to the iwlwifi bits, Johannes says:
      
      "We have a scan fix for passive channels, a new PCI device ID for an old
      device, a NIC reset fix, an RF-Kill fix, a fix for powersave when GO
      interfaces are present as well as an aggregation session fix (for a
      corner case) and a workaround for a firmware design issue - it only
      supports a single GTK in D3."
      
      Bringing-up the rear with the Atheros trees, Kalle says:
      
      "Geert Uytterhoeven fixed an ath10k build problem when NO_DMA=y. I added
      a missing MAINTAINERS entry for ath10k and updated ath6kl git tree
      location."
      
      Along with the above...
      
      Arend van Spriel fixes a brcmfmac WARNING when unplugging the device.
      
      Avinash Patil proves a couple of minor mwifiex fixes relating to P2P mode.
      
      Luciano Coelho updates the MAINTAINERS entry for the wilink drivers.
      
      Stanislaw Gruszka brings an rt2x00 fix for a queue start/stop problem.
      
      Stone Piao fixes another mwifiex problem, a command timeout related to P2P mode.
      
      Tomasz Moń corrects an endian problem in mwifiex.
      
      I'll remind my feeder maintainers to slowdown the patchflow.
      Beyond that, please let me know if there are problems!
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f1059fc
    • J
      Merge branch 'master' of... · 22e02a02
      John W. Linville 提交于
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      22e02a02
  2. 01 8月, 2013 21 次提交
  3. 31 7月, 2013 15 次提交
  4. 30 7月, 2013 1 次提交
    • D
      xen/evtchn: avoid a deadlock when unbinding an event channel · 179fbd5a
      David Vrabel 提交于
      Unbinding an event channel (either with the ioctl or when the evtchn
      device is closed) may deadlock because disable_irq() is called with
      port_user_lock held which is also locked by the interrupt handler.
      
      Think of the IOCTL_EVTCHN_UNBIND is being serviced, the routine has
      just taken the lock, and an interrupt happens. The evtchn_interrupt
      is invoked, tries to take the lock and spins forever.
      
      A quick glance at the code shows that the spinlock is a local IRQ
      variant. Unfortunately that does not help as "disable_irq() waits for
      the interrupt handler on all CPUs to stop running.  If the irq occurs
      on another VCPU, it tries to take port_user_lock and can't because
      the unbind ioctl is holding it." (from David). Hence we cannot
      depend on the said spinlock to protect us. We could make it a system
      wide IRQ disable spinlock but there is a better way.
      
      We can piggyback on the fact that the existence of the spinlock is
      to make get_port_user() checks be up-to-date. And we can alter those
      checks to not depend on the spin lock (as it's protected by u->bind_mutex
      in the ioctl) and can remove the unnecessary locking (this is
      IOCTL_EVTCHN_UNBIND) path.
      
      In the interrupt handler we cannot use the mutex, but we do not
      need it.
      
      "The unbind disables the irq before making the port user stale, so when
      you clear it you are guaranteed that the interrupt handler that might
      use that port cannot be running." (from David).
      
      Hence this patch removes the spinlock usage on the teardown path
      and piggybacks on disable_irq happening before we muck with the
      get_port_user() data. This ensures that the interrupt handler will
      never run on stale data.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      [v1: Expanded the commit description a bit]
      179fbd5a