1. 14 Dec, 2009 2 commits
    • James Bottomley's avatar
      SCSI: scsi_lib_dma: fix bug with dma maps on nested scsi objects · d888b1a2
      James Bottomley authored
      commit d139b9bd upstream.
      
      Some of our virtual SCSI hosts don't have a proper bus parent at the
      top, which can be a problem for doing DMA on them
      
      This patch makes the host device cache a pointer to the physical bus
      device and provides an extra API for setting it (the normal API picks
      it up from the parent).  This patch also modifies the qla2xxx and lpfc
      vport logic to use the new DMA host setting API.
      Acked-By: default avatarJames Smart  <james.smart@emulex.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d888b1a2
    • Sebastian Andrzej Siewior's avatar
      signal: Fix alternate signal stack check · 98d338a7
      Sebastian Andrzej Siewior authored
      commit 2a855dd0 upstream.
      
      All architectures in the kernel increment/decrement the stack pointer
      before storing values on the stack.
      
      On architectures which have the stack grow down sas_ss_sp == sp is not
      on the alternate signal stack while sas_ss_sp + sas_ss_size == sp is
      on the alternate signal stack.
      
      On architectures which have the stack grow up sas_ss_sp == sp is on
      the alternate signal stack while sas_ss_sp + sas_ss_size == sp is not
      on the alternate signal stack.
      
      The current implementation fails for architectures which have the
      stack grow down on the corner case where sas_ss_sp == sp.This was
      reported as Debian bug #544905 on AMD64.
      Simplified test case: http://download.breakpoint.cc/tc-sig-stack.c
      
      The test case creates the following stack scenario:
         0xn0300	stack top
         0xn0200	alt stack pointer top (when switching to alt stack)
         0xn01ff	alt stack end
         0xn0100	alt stack start == stack pointer
      
      If the signal is sent the stack pointer is pointing to the base
      address of the alt stack and the kernel erroneously decides that it
      has already switched to the alternate stack because of the current
      check for "sp - sas_ss_sp < sas_ss_size"
      
      On parisc (stack grows up) the scenario would be:
         0xn0200	stack pointer
         0xn01ff	alt stack end
         0xn0100	alt stack start = alt stack pointer base
         		    	  	  (when switching to alt stack)
         0xn0000	stack base
      
      This is handled correctly by the current implementation.
      
      [ tglx: Modified for archs which have the stack grow up (parisc) which
        	would fail with the correct implementation for stack grows
        	down. Added a check for sp >= current->sas_ss_sp which is
        	strictly not necessary but makes the code symetric for both
        	variants ]
      Signed-off-by: default avatarSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      LKML-Reference: <20091025143758.GA6653@Chamillionaire.breakpoint.cc>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      98d338a7
  2. 03 Dec, 2009 1 commit
  3. 02 Dec, 2009 26 commits
  4. 01 Dec, 2009 11 commits