1. 19 12月, 2007 6 次提交
  2. 13 12月, 2007 1 次提交
  3. 11 12月, 2007 2 次提交
  4. 30 11月, 2007 1 次提交
  5. 28 11月, 2007 1 次提交
  6. 25 11月, 2007 1 次提交
    • J
      [SCSI] NCR5380: Fix bugs and canonicalize irq handler usage · 1e641664
      Jeff Garzik 提交于
      * Always pass the same value to free_irq() that we pass to
        request_irq().  This fixes several bugs.
      
      * Always call NCR5380_intr() with 'irq' and 'dev_id' arguments.
      
        Note, scsi_falcon_intr() is the only case now where dev_id is not the
        scsi_host.
      
      * Always pass Scsi_Host to request_irq().  For most cases, the drivers
        already did so, and I merely neated the source code line.  In other
        cases, either NULL or a non-sensical value was passed, verified to be
        unused, then changed to be Scsi_Host in anticipation of the future.
      
      In addition to the bugs fixes, this change makes the interface usage
      consistent, which in turn enables the possibility of directly
      referencing Scsi_Host from all NCR5380_intr() invocations.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      1e641664
  7. 15 11月, 2007 4 次提交
    • A
      aic94xx_sds: rename FLASH_SIZE · d297a5d5
      Andrew Morton 提交于
      arm:
      
      drivers/scsi/aic94xx/aic94xx_sds.c:381:1: warning: "FLASH_SIZE" redefined
      In file included from include/asm/arch/irqs.h:22,
                       from include/asm/irq.h:4,
                       from include/asm/hardirq.h:6,
                       from include/linux/hardirq.h:7,
                       from include/asm-generic/local.h:5,
                       from include/asm/local.h:1,
                       from include/linux/module.h:19,
                       from include/linux/device.h:21,
                       from include/linux/pci.h:52,
                       from drivers/scsi/aic94xx/aic94xx_sds.c:28:
      include/asm/arch/platform.h:444:1: warning: this is the location of the previous definition
      
      Cc: Gilbert Wu <gilbert_wu@adaptec.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d297a5d5
    • J
      [SCSI] qla1280: convert to use the data buffer accessors · 5c1da582
      Jes Sorensen 提交于
      - remove the unnecessary map_single path.
      - convert to use the new accessors for the sg lists and the parameters.
      
      Fixed to missing initialization of sg lists before calling
      for_each_sg() by Jes Sorensen - sg list needs to be initialized before
      trying to pull the elements out of it.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      5c1da582
    • T
      [SCSI] iscsi: return data transfer residual for data-out commands · 6ee6a2f0
      Tony Battersby 提交于
      Currently, the iSCSI driver returns the data transfer residual for
      data-in commands (e.g. read) but not data-out commands (e.g. write).
      This patch makes it return the data transfer residual for both types of
      commands.
      Signed-off-by: NTony Battersby <tonyb@cybernetics.com>
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      6ee6a2f0
    • T
      [SCSI] iscsi_tcp: fix potential lockup with write commands · 505f76b3
      Tony Battersby 提交于
      There is a race condition in iscsi_tcp.c that may cause it to forget
      that it received a R2T from the target.  This race may cause a data-out
      command (such as a write) to lock up.  The race occurs here:
      
      static int
      iscsi_send_unsol_pdu(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask)
      {
      	struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data;
      	int rc;
      
      	if (tcp_ctask->xmstate & XMSTATE_UNS_HDR) {
      		BUG_ON(!ctask->unsol_count);
      		tcp_ctask->xmstate &= ~XMSTATE_UNS_HDR; <---- RACE
      		...
      
      static int
      iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask)
      {
      	...
      	tcp_ctask->xmstate |= XMSTATE_SOL_HDR_INIT; <---- RACE
      	...
      
      While iscsi_xmitworker() (called from scsi_queue_work()) is preparing to
      send unsolicited data, iscsi_tcp_data_recv() (called from
      tcp_read_sock()) interrupts it upon receipt of a R2T from the target.
      Both contexts do read-modify-write of tcp_ctask->xmstate.  Usually, gcc
      on x86 will make &= and |= atomic on UP (not guaranteed of course), but
      in this case iscsi_send_unsol_pdu() reads the value of xmstate before
      clearing the bit, which causes gcc to read xmstate into a CPU register,
      test it, clear the bit, and then store it back to memory.  If the recv
      interrupt happens during this sequence, then the XMSTATE_SOL_HDR_INIT
      bit set by the recv interrupt will be lost, and the R2T will be
      forgotten.
      
      The patch below (against 2.6.24-rc1) converts accesses of xmstate to use
      set_bit, clear_bit, and test_bit instead of |= and &=.  I have tested
      this patch and verified that it fixes the problem.  Another possible
      approach would be to hold a lock during most of the rx/tx setup and
      post-processing, and drop the lock only for the actual rx/tx.
      Signed-off-by: NTony Battersby <tonyb@cybernetics.com>
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      505f76b3
  8. 12 11月, 2007 1 次提交
    • A
      [SCSI] aacraid: fix security weakness · 5f78e89b
      Alan Cox 提交于
      Actually there are several but one is trivially fixed
      
      1.	FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list
      but needs to
      2.	Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB
      3.	It is possible to construct an attack via the SRB ioctls where
      the user obtains assorted elevated privileges. Various approaches are
      possible, the trivial ones being things like writing to the raw media
      via scsi commands and the swap image of other executing programs with
      higher privileges.
      
      So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating
      ones. This is a bandaid fix for #3 but probably the ioctls should grow
      their own capable checks. The other two bugs need someone competent in that
      driver to fix them.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Acked-by: NMark Salyzyn <mark_salyzyn@adaptec.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      5f78e89b
  9. 08 11月, 2007 3 次提交
  10. 06 11月, 2007 1 次提交
  11. 04 11月, 2007 3 次提交
  12. 02 11月, 2007 1 次提交
    • J
      [SG] Get rid of __sg_mark_end() · c46f2334
      Jens Axboe 提交于
      sg_mark_end() overwrites the page_link information, but all users want
      __sg_mark_end() behaviour where we just set the end bit. That is the most
      natural way to use the sg list, since you'll fill it in and then mark the
      end point.
      
      So change sg_mark_end() to only set the termination bit. Add a sg_magic
      debug check as well, and clear a chain pointer if it is set.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c46f2334
  13. 31 10月, 2007 2 次提交
  14. 29 10月, 2007 6 次提交
  15. 28 10月, 2007 1 次提交
  16. 27 10月, 2007 1 次提交
  17. 24 10月, 2007 5 次提交