1. 02 Nov, 2011 4 commits
    • Nicholas Bellinger's avatar
      target: Make TFO->check_stop_free return free status · 88dd9e26
      Nicholas Bellinger authored
      This patch converts target_core_fabric_ops->check_stop_free() usage in
      transport_cmd_check_stop() and associated fabric module usage to
      return '1' when the passed se_cmd has been released directly within
      ->check_stop_free(), or return '0' when the passed se_cmd has not
      been released.
      
      This addresses an issue where transport_cmd_finish_abort() ->
      transport_cmd_check_stop_to_fabric() was leaking descriptors during
      LUN_RESET for modules using ->check_stop_free(), but not directly
      releasing se_cmd in all cases.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
      88dd9e26
    • Nicholas Bellinger's avatar
      iscsi-target: Fix non-immediate TMR handling · 5a4c8666
      Nicholas Bellinger authored
      This patch addresses two issues with non immediate TMR handling in
      iscsit_handle_task_mgt_cmd().  The first involves breakage due to
      v3.1-rc conversion of iscsit_sequence_cmd(), which upon good status
      would hit the iscsit_add_reject_from_cmd() block of code.  This patch
      adds an explict check for CMDSN_ERROR_CANNOT_RECOVER.
      
      The second adds a check to return when non immediate TMR operation is
      detected after iscsit_ack_from_expstatsn(), as iscsit_sequence_cmd()
      -> iscsit_execute_cmd() will have called transport_generic_handle_tmr()
      for the non immediate TMR case already.
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      5a4c8666
    • Nicholas Bellinger's avatar
      iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd · 7e32da55
      Nicholas Bellinger authored
      This patch adds a missing CMDSN_LOWER_THAN_EXP return check for
      iscsit_sequence_cmd() in iscsit_handle_scsi_cmd() that was incorrectly
      dropped during the v3.1-rc cleanups to use iscsit_sequence_cmd().
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      7e32da55
    • 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 30 commits