1. 07 Feb, 2017 1 commit
  2. 31 Jan, 2017 2 commits
  3. 27 Jan, 2017 2 commits
  4. 28 Oct, 2016 1 commit
  5. 09 Jun, 2016 1 commit
    • Wei Fang's avatar
      scsi: fix race between simultaneous decrements of ->host_failed · 72d8c36e
      Wei Fang authored
      sas_ata_strategy_handler() adds the works of the ata error handler to
      system_unbound_wq. This workqueue asynchronously runs work items, so the
      ata error handler will be performed concurrently on different CPUs. In
      this case, ->host_failed will be decreased simultaneously in
      scsi_eh_finish_cmd() on different CPUs, and become abnormal.
      
      It will lead to permanently inequality between ->host_failed and
      ->host_busy, and scsi error handler thread won't start running. IO
      errors after that won't be handled.
      
      Since all scmds must have been handled in the strategy handler, just
      remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy after
      the strategy handler to fix this race.
      
      Fixes: 50824d6c ("[SCSI] libsas: async ata-eh")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarWei Fang <fangwei1@huawei.com>
      Reviewed-by: default avatarJames Bottomley <jejb@linux.vnet.ibm.com>
      Signed-off-by: Martin K. Petersen's avatarMartin K. Petersen <martin.petersen@oracle.com>
      72d8c36e
  6. 04 Apr, 2016 1 commit
  7. 07 Nov, 2015 1 commit
  8. 06 Sep, 2015 1 commit
  9. 28 Aug, 2015 1 commit
  10. 27 Aug, 2015 1 commit
  11. 26 Aug, 2015 1 commit
  12. 03 Aug, 2015 1 commit
  13. 30 Jul, 2015 1 commit
    • Tony Battersby's avatar
      scsi: fix memory leak with scsi-mq · 0c958ecc
      Tony Battersby authored
      Fix a memory leak with scsi-mq triggered by commands with large data
      transfer length.
      
      __sg_alloc_table() sets both table->nents and table->orig_nents to the
      same value.  When the scatterlist is DMA-mapped, table->nents is
      overwritten with the (possibly smaller) size of the DMA-mapped
      scatterlist, while table->orig_nents retains the original size of the
      allocated scatterlist.  scsi_free_sgtable() should therefore check
      orig_nents instead of nents, and all code that initializes sdb->table
      without calling __sg_alloc_table() should set both nents and orig_nents.
      
      Fixes: d285203c ("scsi: add support for a blk-mq based I/O path.")
      Cc: <stable@vger.kernel.org> # 3.17+
      Signed-off-by: default avatarTony Battersby <tonyb@cybernetics.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
      0c958ecc
  14. 24 Jul, 2015 1 commit
  15. 01 Jun, 2015 1 commit
  16. 27 Mar, 2015 1 commit
  17. 09 Jan, 2015 2 commits
  18. 30 Dec, 2014 1 commit
  19. 24 Nov, 2014 3 commits
  20. 12 Nov, 2014 7 commits
  21. 10 Nov, 2014 2 commits
  22. 15 Sep, 2014 1 commit
  23. 28 Aug, 2014 1 commit
    • Joe Lawrence's avatar
      block,scsi: fixup blk_get_request dead queue scenarios · a492f075
      Joe Lawrence authored
      The blk_get_request function may fail in low-memory conditions or during
      device removal (even if __GFP_WAIT is set). To distinguish between these
      errors, modify the blk_get_request call stack to return the appropriate
      ERR_PTR. Verify that all callers check the return status and consider
      IS_ERR instead of a simple NULL pointer check.
      
      For consistency, make a similar change to the blk_mq_alloc_request leg
      of blk_get_request.  It may fail if the queue is dead, or the caller was
      unwilling to wait.
      Signed-off-by: default avatarJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: Jiri Kosina <jkosina@suse.cz> [for pktdvd]
      Acked-by: Boaz Harrosh <bharrosh@panasas.com> [for osd]
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      a492f075
  24. 26 Aug, 2014 1 commit
  25. 25 Jul, 2014 1 commit
  26. 17 Jul, 2014 2 commits
  27. 24 Jun, 2014 1 commit