linux-kernel-test/drivers/target
Nicholas Bellinger c1ce4bd56f iscsi-target: Fix reject release handling in iscsit_free_cmd()
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: Nicholas Bellinger <nab@linux-iscsi.org>
2012-01-18 08:35:56 +00:00
..
iscsi iscsi-target: Fix reject release handling in iscsit_free_cmd() 2012-01-18 08:35:56 +00:00
loopback tcm_loop: bump max_sectors 2011-12-14 11:28:11 +00:00
tcm_fc tcm_fc: Convert ft_send_work to use target_submit_cmd 2011-12-14 11:42:08 +00:00
Kconfig iscsi-target: Add iSCSI fabric support for target v4.1 2011-07-26 09:16:43 +00:00
Makefile target: remove the ->transport_split_cdb callback in se_cmd 2011-10-24 03:21:15 +00:00
target_core_alua.c target: header reshuffle, part2 2011-12-14 11:26:05 +00:00
target_core_alua.h target: pass the se_task to the CDB emulation callback 2011-11-04 08:00:17 +00:00
target_core_cdb.c target: Set response format in INQUIRY response 2011-12-14 11:38:28 +00:00
target_core_configfs.c target/configs: remove trailing newline from udev_path and alias 2011-12-14 11:28:10 +00:00
target_core_device.c target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_fabric_configfs.c target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_fabric_lib.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_file.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_file.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_hba.c target: header reshuffle, part2 2011-12-14 11:26:05 +00:00
target_core_iblock.c target: don't allocate bio headroom in iblock 2012-01-18 08:28:02 +00:00
target_core_iblock.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_internal.h target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_pr.c target: Allow PERSISTENT RESERVE IN for non-reservation holder 2012-01-18 08:29:36 +00:00
target_core_pr.h target: Move core_scsi3_check_cdb_abort_and_preempt 2011-12-14 11:27:34 +00:00
target_core_pscsi.c target: Drop se_device TCQ queue_depth usage from I/O path 2011-12-14 11:42:13 +00:00
target_core_pscsi.h target: cleanup pscsi request submission 2011-10-24 03:20:44 +00:00
target_core_rd.c target: use \n as a separator for configuration 2011-12-14 11:27:23 +00:00
target_core_rd.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_stat.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_tmr.c target: simplify target_check_cdb_and_preempt 2011-12-14 11:27:55 +00:00
target_core_tpg.c target: fix return code of core_tpg_.*_lun 2012-01-18 08:33:44 +00:00
target_core_transport.c target: avoid multiple outputs in scsi_dump_inquiry() 2012-01-18 08:30:36 +00:00
target_core_ua.c target: header reshuffle, part2 2011-12-14 11:26:05 +00:00
target_core_ua.h