1. 02 Nov, 2011 1 commit
    • Joern Engel's avatar
      target: Avoid double list_del for aborted se_tmr_req · b8a11d73
      Joern Engel authored
      After the list_del() in core_tmr_drain_tmr_list(),
      core_tmr_release_req() would list_del() the same object again.
      
      Call graph:
              core_tmr_drain_tmr_list
              transport_cmd_finish_abort_tmr
              transport_generic_remove
              transport_free_se_cmd
              core_tmr_release_req
      
      So use list_del_init(), as list_del() of an initialized list_head is
      safe and essentially a nop.  In the CONFIG_DEBUG_LIST case, list_del()
      actually poisons the list_head, but that is fine as we free the object
      directly afterwards.
      Signed-off-by: default avatarJoern Engel <joern@logfs.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
      b8a11d73
  2. 27 Oct, 2011 4 commits
  3. 26 Oct, 2011 2 commits
    • Nicholas Bellinger's avatar
      tcm_loop: Add explict read buffer memset for SCF_SCSI_CONTROL_SG_IO_CDB · 8cd79f24
      Nicholas Bellinger authored
      This patch addresses an issue with buggy userspace code sending I/O
      via scsi-generic that does not explictly clear their associated read
      buffers.  It adds an explict memset of the first SGL entry within
      tcm_loop_new_cmd_map() for SCF_SCSI_CONTROL_SG_IO_CDB payloads that
      are currently guaranteed to be a single SGL by target-core code.
      
      This issue is a side effect of the v3.1-rc1 merge to remove the
      extra memcpy between certain control CDB types using a contigious
      + cleared buffer in target-core, and performing a memcpy into the
      SGL list within tcm_loop.
      
      It was originally mainfesting itself by udev + scsi_id + scsi-generic
      not properly setting up the expected /dev/disk/by-id/ symlinks because
      the INQUIRY payload was containing extra bogus data preventing the
      proper NAA IEEE WWN from being parsed by userspace.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      8cd79f24
    • Nicholas Bellinger's avatar
      target: Fix compile warning w/ missing module.h include · c9abb9bb
      Nicholas Bellinger authored
      This patch fixes the following compile warning in target_core_cdb.c in
      recent linux-next code due to the new use of EXPORT_SYMBOL() for
      target_get_task_cdb().
      
      drivers/target/target_core_cdb.c:1316: warning: data definition has no type or storage class
      drivers/target/target_core_cdb.c:1316: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
      drivers/target/target_core_cdb.c:1316: warning: parameter names (without types) in function declaration
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      c9abb9bb
  4. 24 Oct, 2011 33 commits