1. 12 Feb, 2019 2 commits
    • Bart Van Assche's avatar
      scsi: libiscsi: Use scsi_[gs]et_resid() where appropriate · 960bf87a
      Bart Van Assche authored
      This patch does not change any functionality.
      
      Cc: Lee Duncan <lduncan@suse.com>
      Cc: Chris Leech <cleech@redhat.com>
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      960bf87a
    • Bart Van Assche's avatar
      scsi: scsi_debug: Fix a recently introduced regression · c208556a
      Bart Van Assche authored
      A recent commit removed an element from opcode_info_arr[] but did not
      modify opcode_ind_arr[] nor was SDEB_I_XDWRITEREAD removed. Remove
      SDEB_I_XDWRITEREAD and bring the two arrays again in sync. This patch
      avoids that the following is reported:
      
      BUG: KASAN: null-ptr-deref in scsi_debug_queuecommand+0x60f/0xc90 [scsi_debug]
      Read of size 1 at addr 0000000000000001 by task iscsi-test-cu/683
      CPU: 3 PID: 683 Comm: iscsi-test-cu Not tainted 5.0.0-rc5-dbg+ #1
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
      Call Trace:
       dump_stack+0x86/0xca
       kasan_report.cold.3+0x5/0x3e
       __asan_load1+0x47/0x50
       scsi_debug_queuecommand+0x60f/0xc90 [scsi_debug]
       scsi_queue_rq+0xc17/0x12e0
       blk_mq_dispatch_rq_list+0x5fc/0xb10
       blk_mq_sched_dispatch_requests+0x2f7/0x300
       __blk_mq_run_hw_queue+0xd6/0x180
       __blk_mq_delay_run_hw_queue+0x25c/0x290
       blk_mq_run_hw_queue+0x119/0x1b0
       blk_mq_sched_insert_request+0x274/0x350
       blk_execute_rq_nowait+0x78/0x90
       blk_execute_rq+0xcc/0x140
       sg_io+0x30f/0x700
       scsi_cmd_ioctl+0x4d4/0x540
       scsi_cmd_blk_ioctl+0x7b/0x8b
       sd_ioctl+0xba/0x150
       blkdev_ioctl+0x6e1/0xea0
       block_ioctl+0x79/0x90
       do_vfs_ioctl+0x12b/0x9b0
       ksys_ioctl+0x41/0x80
       __x64_sys_ioctl+0x43/0x50
       do_syscall_64+0x71/0x210
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Douglas Gilbert <dgilbert@interlog.com>
      Fixes: ae3d56d8 ("scsi: remove bidirectional command support")
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      c208556a
  2. 08 Feb, 2019 8 commits
  3. 06 Feb, 2019 30 commits