1. 12 5月, 2006 2 次提交
    • J
      [BLOCK] limit request_fn recursion · dac07ec1
      Jens Axboe 提交于
      Don't recurse back into the driver even if the unplug threshold is met,
      when the driver asks for a requeue. This is both silly from a logical
      point of view (requeues typically happen due to driver/hardware
      shortage), and also dangerous since we could hit an endless request_fn
      -> requeue -> unplug -> request_fn loop and crash on stack overrun.
      
      Also limit blk_run_queue() to one level of recursion, similar to how
      blk_start_queue() works.
      
      This patch fixed a real problem with SLES10 and lpfc, and it could hit
      any SCSI lld that returns non-zero from it's ->queuecommand() handler.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dac07ec1
    • L
      ptrace_attach: fix possible deadlock schenario with irqs · f358166a
      Linus Torvalds 提交于
      Eric Biederman points out that we can't take the task_lock while holding
      tasklist_lock for writing, because another CPU that holds the task lock
      might take an interrupt that then tries to take tasklist_lock for writing.
      
      Which would be a nasty deadlock, with one CPU spinning forever in an
      interrupt handler (although admittedly you need to really work at
      triggering it ;)
      
      Since the ptrace_attach() code is special and very unusual, just make it
      be extra careful, and use trylock+repeat to avoid the possible deadlock.
      
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Roland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f358166a
  2. 11 5月, 2006 8 次提交
  3. 10 5月, 2006 5 次提交
    • R
      IPoIB: Free child interfaces properly · 5941d079
      Roland Dreier 提交于
      When deleting a child interface with a non-default P_Key via
      /sys/class/net/ibX/delete_child, the interface must be freed with
      free_netdev() (rather than kfree() on the private data).
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      5941d079
    • R
      IB/mthca: Fix race in reference counting · a3285aa4
      Roland Dreier 提交于
      Fix races in in destroying various objects.  If a destroy routine
      waits for an object to become free by doing
      
      	wait_event(&obj->wait, !atomic_read(&obj->refcount));
      	/* now clean up and destroy the object */
      
      and another place drops a reference to the object by doing
      
      	if (atomic_dec_and_test(&obj->refcount))
      		wake_up(&obj->wait);
      
      then this is susceptible to a race where the wait_event() and final
      freeing of the object occur between the atomic_dec_and_test() and the
      wake_up().  And this is a use-after-free, since wake_up() will be
      called on part of the already-freed object.
      
      Fix this in mthca by replacing the atomic_t refcounts with plain old
      integers protected by a spinlock.  This makes it possible to do the
      decrement of the reference count and the wake_up() so that it appears
      as a single atomic operation to the code waiting on the wait queue.
      
      While touching this code, also simplify mthca_cq_clean(): the CQ being
      cleaned cannot go away, because it still has a QP attached to it.  So
      there's no reason to be paranoid and look up the CQ by number; it's
      perfectly safe to use the pointer that the callers already have.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      a3285aa4
    • R
      IB/srp: Fix tracking of pending requests during error handling · d945e1df
      Roland Dreier 提交于
      If a SCSI abort completes, or the command completes successfully, then
      the driver must remove the command from its queue of pending
      commands.  Similarly, if a device reset succeeds, then all commands
      queued for the given device must be removed from the queue.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d945e1df
    • R
      IB: Fix display of 4-bit port counters in sysfs · d8b9f23b
      Ralph Campbell 提交于
      The code to display local_link_integrity_errors and
      excessive_buffer_overrun_errors in
      /sys/class/infiniband/<hca>/ports/<n>/counters/
      uses the wrong shift to extract the 4 bit values.
      Signed-off-by: NRalph Campbell <ralph.campbell@qlogic.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d8b9f23b
    • L
      Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6 · 3cd73eed
      Linus Torvalds 提交于
      * 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
        [PATCH] bcm43xx: Fix access to non-existent PHY registers
        [PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_init
        [PATCH] bcm43xx: check for valid MAC address in SPROM
        [PATCH] ieee80211: Fix A band channel count (resent)
        [PATCH] bcm43xx: fix iwmode crash when down
        [PATCH] softmac: make non-operational after being stopped
        [PATCH] softmac: don't reassociate if user asked for deauthentication
        spidernet: enable support for bcm5461 ethernet phy
        spidernet: introduce new setting
        Fix RTL8019AS init for Toshiba RBTX49xx boards
        au1000_eth.c: use ether_crc() from <linux/crc32.h>
        sky2: version 1.3
        Add more support for the Yukon Ultra chip found in dual core centino laptops.
        sky2: synchronize irq on remove
        sky2: dont write status ring
        sky2: edge triggered workaround enhancement
        sky2: use mask instead of modulo operation
        sky2: tx ring index mask fix
        sky2: status irq hang fix
        sky2: backout NAPI reschedule
      3cd73eed
  4. 09 5月, 2006 25 次提交