android_kernel_samsung_msm8976/drivers/target
Nicholas Bellinger 8cd79f2435 tcm_loop: Add explict read buffer memset for SCF_SCSI_CONTROL_SG_IO_CDB
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: Nicholas Bellinger <nab@linux-iscsi.org>
2011-10-26 20:42:13 +00:00
..
iscsi target: Fix incorrect transport_sent usage 2011-10-24 03:22:06 +00:00
loopback tcm_loop: Add explict read buffer memset for SCF_SCSI_CONTROL_SG_IO_CDB 2011-10-26 20:42:13 +00:00
tcm_fc target: remove the TRANSPORT_REMOVE state 2011-10-24 03:21:47 +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: Fix REPORT TARGET PORT GROUPS handling with small allocation length 2011-10-24 03:21:19 +00:00
target_core_alua.h
target_core_cdb.c target: Fix compile warning w/ missing module.h include 2011-10-26 20:42:13 +00:00
target_core_configfs.c target: Remove legacy se_task->task_timer and associated logic 2011-10-24 03:22:08 +00:00
target_core_device.c target: Remove legacy se_task->task_timer and associated logic 2011-10-24 03:22:08 +00:00
target_core_fabric_configfs.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_fabric_lib.c target: remove custom hex2bin() implementation 2011-07-22 09:37:49 +00:00
target_core_file.c target: clean up the backend interface to caching parameters 2011-10-24 03:21:31 +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: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_hba.h
target_core_iblock.c target: clean up the backend interface to caching parameters 2011-10-24 03:21:31 +00:00
target_core_iblock.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_pr.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_pr.h target: Core cleanups from AGrover (round 1) 2011-07-22 09:37:43 +00:00
target_core_pscsi.c target: remove the task_sg_bidi field se_task and pSCSI BIDI support 2011-10-24 03:21:56 +00:00
target_core_pscsi.h target: cleanup pscsi request submission 2011-10-24 03:20:44 +00:00
target_core_rd.c target: make the ->get_cdb method optional 2011-10-24 03:21:11 +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 unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_stat.h [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_tmr.c target: use a workqueue for I/O completions 2011-10-24 03:21:52 +00:00
target_core_tpg.c target: Convert acl_node_lock to be IRQ-disabling 2011-08-22 19:28:36 +00:00
target_core_transport.c target: Remove legacy se_task->task_timer and associated logic 2011-10-24 03:22:08 +00:00
target_core_ua.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_ua.h