1. 15 4月, 2012 4 次提交
  2. 18 3月, 2012 1 次提交
  3. 16 3月, 2012 2 次提交
  4. 14 3月, 2012 1 次提交
    • N
      iscsi-target: Fix reservation conflict -EBUSY response handling bug · 00fdc6bb
      Nicholas Bellinger 提交于
      This patch addresses a iscsi-target specific bug related to reservation conflict
      handling in iscsit_handle_scsi_cmd() that has been causing reservation conflicts
      to complete and not fail as expected due to incorrect errno checking.  The problem
      occured with the change to return -EBUSY from transport_generic_cmd_sequencer() ->
      transport_generic_allocate_tasks() failures, that broke iscsit_handle_scsi_cmd()
      checking for -EINVAL in order to invoke a non GOOD status response.
      
      This was manifesting itself as data corruption with legacy SPC-2 reservations,
      but also effects iscsi-target LUNs with SPC-3 persistent reservations.
      
      This bug was originally introduced in lio-core commit:
      
      commit 03e98c9e
      Author: Nicholas Bellinger <nab@linux-iscsi.org>
      Date:   Fri Nov 4 02:36:16 2011 -0700
      
          target: Address legacy PYX_TRANSPORT_* return code breakage
      Reported-by: NMartin Svec <martin.svec@zoner.cz>
      Cc: Martin Svec <martin.svec@zoner.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      00fdc6bb
  5. 11 3月, 2012 4 次提交
  6. 09 3月, 2012 1 次提交
  7. 26 2月, 2012 5 次提交
  8. 14 2月, 2012 1 次提交
  9. 07 2月, 2012 2 次提交
  10. 18 1月, 2012 5 次提交
    • N
      iscsi-target: Fix discovery with INADDR_ANY and IN6ADDR_ANY_INIT · 2f9bc894
      Nicholas Bellinger 提交于
      This patch addresses a bug with sendtargets discovery where INADDR_ANY (0.0.0.0)
      + IN6ADDR_ANY_INIT ([0:0:0:0:0:0:0:0]) network portals where incorrectly being
      reported back to initiators instead of the address of the connecting interface.
      To address this, save local socket ->getname() output during iscsi login setup,
      and makes iscsit_build_sendtargets_response() return these TargetAddress keys
      when INADDR_ANY or IN6ADDR_ANY_INIT portals are in use.
      Reported-by: NDax Kelson <dkelson@gurulabs.com>
      Reported-by: NAndy Grover <agrover@redhat.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2f9bc894
    • J
      iscsi-target: Fix up a few assignments · e8904dc5
      Jesper Juhl 提交于
      A statement such as
        struct iscsi_node_attrib *na = na = iscsit_tpg_get_node_attrib(sess);
      has undefined behaviour since there are two assignments to 'na', strictly
      speaking (the order in which side-effects from the assignments take place
      is undefined since there's no intervening sequence point), and it looks
      unintentional in any case.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e8904dc5
    • D
      iscsi-target: make one-bit bitfields unsigned · f8d48ae5
      Dan Carpenter 提交于
      Signed bitfields are a problem because instead of being 1 or 0 like
      you'd expect they are 0 and -1.  It doesn't cause a problem in this case
      but sparse complains:
      
      drivers/target/iscsi/iscsi_target_core.h:564:56: error: dubious one-bit
      signed bitfield
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f8d48ae5
    • 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
  11. 14 12月, 2011 3 次提交
  12. 06 12月, 2011 7 次提交
  13. 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
  14. 01 11月, 2011 2 次提交