1. 25 May, 2011 6 commits
  2. 24 May, 2011 3 commits
    • Liu Yuan's avatar
      RDMA/nes: Add a check for strict_strtoul() · 52f81dba
      Liu Yuan authored
      It should check if strict_strtoul() succeeds before using
      'wqm_quanta_value'.
      Signed-off-by: default avatarLiu Yuan <tailai.ly@taobao.com>
      
      [ Convert to kstrtoul() directly while we're here.  - Roland ]
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      52f81dba
    • Steve Wise's avatar
      RDMA/cxgb3: Don't post zero-byte read if endpoint is going away · 80783868
      Steve Wise authored
      tx_ack() wasn't checking the endpoint state and consequently would
      attempt to post the p2p 0B read on an endpoint/QP that is closing or
      aborting.  This causes a NULL pointer dereference crash.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      80783868
    • Steve Wise's avatar
      RDMA/cxgb4: Use completion objects for event blocking · c337374b
      Steve Wise authored
      There exists a race condition when using wait_queue_head_t objects
      that are declared on the stack.  This was being done in a few places
      where we are sending work requests to the FW and awaiting replies, but
      we don't have an endpoint structure with an embedded c4iw_wr_wait
      struct.  So the code was allocating it locally on the stack.  Bad
      design.  The race is:
      
        1) thread on cpuX declares the wait_queue_head_t on the stack, then
           posts a firmware WR with that wait object ptr as the cookie to be
           returned in the WR reply.  This thread will proceed to block in
           wait_event_timeout() but before it does:
      
        2) An interrupt runs on cpuY with the WR reply.  fw6_msg() handles
           this and calls c4iw_wake_up().  c4iw_wake_up() sets the condition
           variable in the c4iw_wr_wait object to TRUE and will call
           wake_up(), but before it calls wake_up():
      
        3) The thread on cpuX calls c4iw_wait_for_reply(), which calls
           wait_event_timeout().  The wait_event_timeout() macro checks the
           condition variable and returns immediately since it is TRUE.  So
           this thread never blocks/sleeps. The function then returns
           effectively deallocating the c4iw_wr_wait object that was on the
           stack.
      
        4) So at this point cpuY has a pointer to the c4iw_wr_wait object
           that is no longer valid.  Further its pointing to a stack frame
           that might now be in use by some other context/thread.  So cpuY
           continues execution and calls wake_up() on a ptr to a wait object
           that as been effectively deallocated.
      
      This race, when it hits, can cause a crash in wake_up(), which I've
      seen under heavy stress. It can also corrupt the referenced stack
      which can cause any number of failures.
      
      The fix:
      
      Use struct completion, which supports on-stack declarations.
      Completions use a spinlock around setting the condition to true and
      the wake up so that steps 2 and 4 above are atomic and step 3 can
      never happen in-between.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      c337374b
  3. 23 May, 2011 5 commits
  4. 20 May, 2011 22 commits
  5. 19 May, 2011 4 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 · 51509a28
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: (34 commits)
        PM: Introduce generic prepare and complete callbacks for subsystems
        PM: Allow drivers to allocate memory from .prepare() callbacks safely
        PM: Remove CONFIG_PM_VERBOSE
        Revert "PM / Hibernate: Reduce autotuned default image size"
        PM / Hibernate: Add sysfs knob to control size of memory for drivers
        PM / Wakeup: Remove useless synchronize_rcu() call
        kmod: always provide usermodehelper_disable()
        PM / ACPI: Remove acpi_sleep=s4_nonvs
        PM / Wakeup: Fix build warning related to the "wakeup" sysfs file
        PM: Print a warning if firmware is requested when tasks are frozen
        PM / Runtime: Rework runtime PM handling during driver removal
        Freezer: Use SMP barriers
        PM / Suspend: Do not ignore error codes returned by suspend_enter()
        PM: Fix build issue in clock_ops.c for CONFIG_PM_RUNTIME unset
        PM: Revert "driver core: platform_bus: allow runtime override of dev_pm_ops"
        OMAP1 / PM: Use generic clock manipulation routines for runtime PM
        PM: Remove sysdev suspend, resume and shutdown operations
        PM / PowerPC: Use struct syscore_ops instead of sysdevs for PM
        PM / UNICORE32: Use struct syscore_ops instead of sysdevs for PM
        PM / AVR32: Use struct syscore_ops instead of sysdevs for PM
        ...
      51509a28
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · 75f5076b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        IB/qib: Use pci_dev->revision
        RDMA/iwcm: Get rid of enum iw_cm_event_status
        IB/ipath: Use pci_dev->revision, again
        IB/qib: Prevent driver hang with unprogrammed boards
        RDMA/cxgb4: EEH errors can hang the driver
        RDMA/cxgb4: Reset wait condition atomically
        RDMA/cxgb4: Fix missing parentheses
        RDMA/cxgb4: Initialization errors can cause crash
        RDMA/cxgb4: Don't change QP state outside EP lock
        RDMA/cma: Add an ID_REUSEADDR option
        RDMA/cma: Fix handling of IPv6 addressing in cma_use_port
      75f5076b
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-2.6-cm · 83d7e948
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-2.6-cm:
        kmemleak: Initialise kmemleak after debug_objects_mem_init()
        kmemleak: Select DEBUG_FS unconditionally in DEBUG_KMEMLEAK
        kmemleak: Do not return a pointer to an object that kmemleak did not get
      83d7e948
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus · fce4a1dd
      Linus Torvalds authored
      * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (48 commits)
        MIPS: Move arch_get_unmapped_area and gang to new file.
        MIPS: Cleanup arch_get_unmapped_area
        MIPS: Octeon: Don't request interrupts for unused IPI mailbox bits.
        Octeon: Fix interrupt irq settings for performance counters.
        MIPS: Fix build warnings on defconfigs
        MIPS: Lemote 2F, Malta: Fix build warning
        MIPS: Set ELF AT_PLATFORM string for Loongson2 processors
        MIPS: Set ELF AT_PLATFORM string for BMIPS processors
        MIPS: Introduce set_elf_platform() helper function
        MIPS: JZ4740: setup: Autodetect physical memory.
        MIPS: BCM47xx: Fix MAC address parsing.
        MIPS: BCM47xx: Extend the filling of SPROM from NVRAM
        MIPS: BCM47xx: Register SSB fallback sprom callback
        MIPS: BCM47xx: Extend bcm47xx_fill_sprom with prefix.
        SSB: Change fallback sprom to callback mechanism.
        MIPS: Alchemy: Clean up GPIO registers and accessors
        MIPS: Alchemy: Cleanup DMA addresses
        MIPS: Alchemy: Rewrite ethernet platform setup
        MIPS: Alchemy: Rewrite UART setup and constants.
        MIPS: Alchemy: Convert dbdma.c to syscore_ops
        ...
      fce4a1dd