1. 22 9月, 2018 1 次提交
  2. 17 9月, 2018 1 次提交
  3. 22 8月, 2018 1 次提交
  4. 30 7月, 2018 1 次提交
  5. 27 6月, 2018 2 次提交
  6. 19 4月, 2018 1 次提交
  7. 20 3月, 2018 1 次提交
    • M
      scsi: sd: Remember that READ CAPACITY(16) succeeded · 597d7400
      Martin K. Petersen 提交于
      The USB storage glue sets the try_rc_10_first flag in an attempt to
      avoid wedging poorly implemented legacy USB devices.
      
      If the device capacity is too large to be expressed in the provided
      response buffer field of READ CAPACITY(10), a well-behaved device will
      set the reported capacity to 0xFFFFFFFF. We will then attempt to issue a
      READ CAPACITY(16) to obtain the real capacity.
      
      Since this part of the discovery logic is not covered by the first_scan
      flag, a warning will be printed a couple of times times per revalidate
      attempt if we upgrade from READ CAPACITY(10) to READ CAPACITY(16).
      
      Remember that we have successfully issued READ CAPACITY(16) so we can
      take the fast path on subsequent revalidate attempts.
      Reported-by: NMenion <menion@gmail.com>
      Reviewed-by: NLaurence Oberman <loberman@redhat.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      597d7400
  8. 09 3月, 2018 1 次提交
  9. 07 3月, 2018 1 次提交
  10. 09 1月, 2018 1 次提交
  11. 12 12月, 2017 1 次提交
    • B
      scsi: core: Fix a scsi_show_rq() NULL pointer dereference · 14e3062f
      Bart Van Assche 提交于
      Avoid that scsi_show_rq() triggers a NULL pointer dereference if called
      after sd_uninit_command(). Swap the NULL pointer assignment and the
      mempool_free() call in sd_uninit_command() to make it less likely that
      scsi_show_rq() triggers a use-after-free. Note: even with these changes
      scsi_show_rq() can trigger a use-after-free but that's a lesser evil
      than e.g. suppressing debug information for T10 PI Type 2 commands
      completely. This patch fixes the following oops:
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: scsi_format_opcode_name+0x1a/0x1c0
      CPU: 1 PID: 1881 Comm: cat Not tainted 4.14.0-rc2.blk_mq_io_hang+ #516
      Call Trace:
       __scsi_format_command+0x27/0xc0
       scsi_show_rq+0x5c/0xc0
       __blk_mq_debugfs_rq_show+0x116/0x130
       blk_mq_debugfs_rq_show+0xe/0x10
       seq_read+0xfe/0x3b0
       full_proxy_read+0x54/0x90
       __vfs_read+0x37/0x160
       vfs_read+0x96/0x130
       SyS_read+0x55/0xc0
       entry_SYSCALL_64_fastpath+0x1a/0xa5
      
      [mkp: added Type 2]
      
      Fixes: 0eebd005 ("scsi: Implement blk_mq_ops.show_rq()")
      Reported-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Ming Lei <ming.lei@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      14e3062f
  12. 05 12月, 2017 1 次提交
  13. 17 10月, 2017 2 次提交
  14. 03 10月, 2017 2 次提交
  15. 26 9月, 2017 1 次提交
  16. 16 9月, 2017 1 次提交
  17. 26 8月, 2017 4 次提交
  18. 17 8月, 2017 1 次提交
  19. 29 6月, 2017 1 次提交
  20. 27 6月, 2017 1 次提交
  21. 13 6月, 2017 1 次提交
    • B
      scsi: Protect SCSI device state changes with a mutex · 0db6ca8a
      Bart Van Assche 提交于
      Serializing SCSI device state changes avoids that two state changes can
      occur concurrently, e.g. the state changes in scsi_target_block() and
      __scsi_remove_device(). This serialization is essential to make patch
      "Make __scsi_remove_device go straight from BLOCKED to DEL" work
      reliably.
      
      Enable this mechanism for all scsi_target_*block() callers but not for
      the scsi_internal_device_unblock() calls from the mpt3sas driver because
      that driver can call scsi_internal_device_unblock() from atomic context.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      0db6ca8a
  22. 17 5月, 2017 1 次提交
  23. 12 5月, 2017 2 次提交
  24. 26 4月, 2017 2 次提交
  25. 25 4月, 2017 2 次提交
  26. 09 4月, 2017 6 次提交