1. 18 1月, 2012 2 次提交
    • N
      iscsi-target: Fix double list_add with iscsit_alloc_buffs reject · cd931ee6
      Nicholas Bellinger 提交于
      This patch fixes a bug where the iscsit_add_reject_from_cmd() call
      from a failure to iscsit_alloc_buffs() was incorrectly passing
      add_to_conn=1 and causing a double list_add after iscsi_cmd->i_list
      had already been added in iscsit_handle_scsi_cmd().
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      cd931ee6
    • N
      iscsi-target: Fix reject release handling in iscsit_free_cmd() · c1ce4bd5
      Nicholas Bellinger 提交于
      This patch addresses a bug where iscsit_free_cmd() was incorrectly calling
      iscsit_release_cmd() for ISCSI_OP_REJECT because iscsi_add_reject*() will
      overwrite the original iscsi_cmd->iscsi_opcode assignment.  This bug was
      introduced with the following commit:
      
      commit 0be67f2ed8f577d2c72d917928394c5885fa9134
      Author: Nicholas Bellinger <nab@linux-iscsi.org>
      Date:   Sun Oct 9 01:48:14 2011 -0700
      
          iscsi-target: Remove SCF_SE_LUN_CMD flag abuses
      
      and was manifesting itself as list corruption with the following:
      
      [  131.191092] ------------[ cut here ]------------
      [  131.191092] WARNING: at lib/list_debug.c:53 __list_del_entry+0x8d/0x98()
      [  131.191092] Hardware name: VMware Virtual Platform
      [  131.191092] list_del corruption. prev->next should be ffff880022d3c100, but was 6b6b6b6b6b6b6b6b
      [  131.191092] Modules linked in: tcm_vhost ib_srpt ib_cm ib_sa ib_mad ib_core tcm_qla2xxx qla2xxx tcm_loop tcm_fc libfc scsi_transport_fc crc32c iscsi_target_mod target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi sr_mod cdrom sd_mod e1000 ata_piix libata mptspi mptscsih mptbase [last unloaded: scsi_wait_scan]
      [  131.191092] Pid: 2250, comm: iscsi_ttx Tainted: G        W    3.2.0-rc4+ #42
      [  131.191092] Call Trace:
      [  131.191092]  [<ffffffff8103b553>] warn_slowpath_common+0x80/0x98
      [  131.191092]  [<ffffffff8103b5ff>] warn_slowpath_fmt+0x41/0x43
      [  131.191092]  [<ffffffff811d0279>] __list_del_entry+0x8d/0x98
      [  131.191092]  [<ffffffffa01395c9>] transport_lun_remove_cmd+0x9b/0xb7 [target_core_mod]
      [  131.191092]  [<ffffffffa013a55c>] transport_generic_free_cmd+0x5d/0x71 [target_core_mod]
      [  131.191092]  [<ffffffffa01a012b>] iscsit_free_cmd+0x1e/0x27 [iscsi_target_mod]
      [  131.191092]  [<ffffffffa01a13be>] iscsit_close_connection+0x14d/0x5b2 [iscsi_target_mod]
      [  131.191092]  [<ffffffffa0196a0c>] iscsit_take_action_for_connection_exit+0xdb/0xe0 [iscsi_target_mod]
      [  131.191092]  [<ffffffffa01a55d4>] iscsi_target_tx_thread+0x15cb/0x1608 [iscsi_target_mod]
      [  131.191092]  [<ffffffff8103609a>] ? check_preempt_wakeup+0x121/0x185
      [  131.191092]  [<ffffffff81030801>] ? __dequeue_entity+0x2e/0x33
      [  131.191092]  [<ffffffffa01a4009>] ? iscsit_send_text_rsp+0x25f/0x25f [iscsi_target_mod]
      [  131.191092]  [<ffffffffa01a4009>] ? iscsit_send_text_rsp+0x25f/0x25f [iscsi_target_mod]
      [  131.191092]  [<ffffffff8138f706>] ? schedule+0x55/0x57
      [  131.191092]  [<ffffffff81056c7d>] kthread+0x7d/0x85
      [  131.191092]  [<ffffffff81399534>] kernel_thread_helper+0x4/0x10
      [  131.191092]  [<ffffffff81056c00>] ? kthread_worker_fn+0x16d/0x16d
      [  131.191092]  [<ffffffff81399530>] ? gs_change+0x13/0x13
      
      Reported-by: <jrepac@yahoo.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c1ce4bd5
  2. 14 12月, 2011 3 次提交
  3. 06 12月, 2011 7 次提交
  4. 02 11月, 2011 2 次提交
    • N
      iscsi-target: Fix non-immediate TMR handling · 5a4c8666
      Nicholas Bellinger 提交于
      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: NNicholas Bellinger <nab@linux-iscsi.org>
      5a4c8666
    • N
      iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd · 7e32da55
      Nicholas Bellinger 提交于
      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: NNicholas Bellinger <nab@linux-iscsi.org>
      7e32da55
  5. 01 11月, 2011 2 次提交
  6. 24 10月, 2011 9 次提交
  7. 28 9月, 2011 1 次提交
  8. 17 9月, 2011 2 次提交
    • N
      iscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets · 40b05497
      Nicholas Bellinger 提交于
      This patch fixes a bug in the iscsit_fe_sendpage_sg() transmit codepath that
      was originally introduced with the v3.1 iscsi-target merge that incorrectly
      uses hardcoded cmd->iov_data_count values to determine cmd->iov_data[] offsets
      for extra outgoing padding and DataDigest payload vectors.
      
      This code is obviously incorrect for the DataDigest enabled case with sendpage
      offload, and this fix ensures correct operation for padding + DataDigest,
      padding only, and DataDigest only cases.  The bug was introduced during a
      pre-merge change in iscsit_fe_sendpage_sg() to natively use struct scatterlist
      instead of the legacy v3.0 struct se_mem logic.
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      40b05497
    • N
      iscsi-target: Disable markers + remove dangerous local scope array usage · 2ff017f5
      Nicholas Bellinger 提交于
      This patch makes iscsi-target explictly disable OFMarker=Yes and IFMarker=yes
      parameter key usage during iscsi login by setting IFMarkInt_Reject and
      OFMarkInt_Reject values in iscsi_enforce_integrity_rules() to effectively
      disable iscsi marker usage.  With this patch, an initiator proposer asking
      to enable either marker parameter keys will be issued a 'No' response, and
      the target sets OFMarkInt + IFMarkInt parameter key response to 'Irrelevant'.
      
      With markers disabled during iscsi login, this patch removes the problematic
      on-stack local-scope array for marker intervals in iscsit_do_rx_data() +
      iscsit_do_tx_data(), and other related marker code in iscsi_target_util.c.
      This fixes a potentional stack smashing scenario with small range markers
      enabled and a large MRDSL as reported by DanC here:
      
      [bug report] target: stack can be smashed
      http://www.spinics.net/lists/target-devel/msg00453.htmlReported-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2ff017f5
  9. 23 8月, 2011 6 次提交
  10. 29 7月, 2011 1 次提交
    • R
      target: iscsi_target depends on NET · d52a10d0
      Randy Dunlap 提交于
      iscsi target code uses lots on network interface functions, so it
      should depend on NET.  Fixes many build errors when NET is not enabled:
      
      ERROR: "kernel_sendmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "in_aton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "sock_release" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_listen" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_setsockopt" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_recvmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_accept" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "sock_create" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_bind" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "in6_pton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d52a10d0
  11. 28 7月, 2011 5 次提交