linux/drivers/target
Roland Dreier 20a1d763e5 target: Don't call TFO->write_pending if data_length == 0
commit 885e7b0e18 upstream.

If an initiator sends a zero-length command (e.g. TEST UNIT READY) but
sets the transfer direction in the transport layer to indicate a
data-out phase, we still shouldn't try to transfer data.  At best it's
a NOP, and depending on the transport, we might crash on an
uninitialized sg list.

Reported-by: Craig Watson <craig.watson@vanguard-rugged.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06 15:55:38 -08:00
..
iscsi iscsi-target: Fix memory corruption in iscsit_logout_post_handler_diffcid 2014-10-05 14:52:18 -07:00
loopback tcm_loop: Enable DIF/DIX modes in SCSI host LLD 2014-01-19 02:22:06 +00:00
sbp target: Remove TF_CIT_TMPL macro 2013-10-16 13:35:02 -07:00
tcm_fc tcm_fc: Fix free-after-use regression in ft_free_cmd 2014-06-07 10:28:26 -07:00
Kconfig target/iblock: Add blk_integrity + BIP passthrough support 2014-01-18 10:14:22 +00:00
Makefile target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00
target_core_alua.c target: Allow READ_CAPACITY opcode in ALUA Standby access state 2014-06-16 13:40:32 -07:00
target_core_alua.h target_core_alua: Referrals configfs integration 2014-01-09 21:48:35 -08:00
target_core_configfs.c target: Fix inverted logic in SE_DEV_ALUA_SUPPORT_STATE_STORE 2014-10-05 14:52:18 -07:00
target_core_device.c target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-11-14 08:59:57 -08:00
target_core_fabric_configfs.c target: Fix sizeof in kmalloc for some default_groups arrays 2013-12-16 12:42:20 -08:00
target_core_fabric_lib.c target: Update copyright ownership/year information to 2013 2013-09-10 20:23:36 -07:00
target_core_file.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
target_core_file.h Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
target_core_hba.c target: Update copyright ownership/year information to 2013 2013-09-10 20:23:36 -07:00
target_core_iblock.c target/iblock: Fix double bioset_integrity_free bug 2014-05-06 07:59:29 -07:00
target_core_iblock.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_internal.h target/configfs: Expose protection device attributes 2014-01-18 09:57:47 +00:00
target_core_pr.c target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-11-14 08:59:57 -08:00
target_core_pr.h target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-11-14 08:59:57 -08:00
target_core_pscsi.c target/pscsi: fix return value check 2013-10-25 10:42:09 -07:00
target_core_pscsi.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_rd.c target: Explicitly clear ramdisk_mcp backend pages 2014-06-30 20:12:00 -07:00
target_core_rd.h target/rd: Add support for protection SGL setup + release 2014-01-19 02:22:05 +00:00
target_core_sbc.c target: Report correct response length for some commands 2014-06-30 20:12:00 -07:00
target_core_spc.c target: Report correct response length for some commands 2014-06-30 20:12:00 -07:00
target_core_stat.c target: Convert se_device statistics to atomic_long_t 2013-11-13 18:34:55 -08:00
target_core_tmr.c target: Convert se_device statistics to atomic_long_t 2013-11-13 18:34:55 -08:00
target_core_tpg.c target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-11-14 08:59:57 -08:00
target_core_transport.c target: Don't call TFO->write_pending if data_length == 0 2014-12-06 15:55:38 -08:00
target_core_ua.c target: Remove unused ua_dev_list member in struct se_ua 2013-12-16 12:39:04 -08:00
target_core_ua.h target core: rename (ex,im)plict -> (ex,im)plicit 2013-11-20 11:24:40 -08:00
target_core_xcopy.c drivers: target: Move prototype declaration of function to header file target_core_pr.h 2014-01-09 21:48:36 -08:00
target_core_xcopy.h target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00