linux/drivers/target
Sebastian Andrzej Siewior 9649fa1b87 target/file: walk properly over sg list
This patch changes fileio to use for_each_sg() when walking se_task->task_sg
memory passed into from loopback LLD struct scsi_cmnd scatterlist memory.

This addresses an issue where FILEIO backends with loopback where hitting the
following OOPs with mkfs.ext2:

|kernel BUG at include/linux/scatterlist.h:97!
|invalid opcode: 0000 [#1] PREEMPT SMP
|Modules linked in: sd_mod tcm_loop target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs scsi_mod
|
|Pid: 671, comm: LIO_fileio Not tainted 3.1.0-rc10+ #139 Bochs Bochs
|EIP: 0060:[<e0afd746>] EFLAGS: 00010202 CPU: 0
|EIP is at fd_do_task+0x396/0x420 [target_core_file]
| [<e0aa7884>] __transport_execute_tasks+0xd4/0x190 [target_core_mod]
| [<e0aa797c>] transport_execute_tasks+0x3c/0xf0 [target_core_mod]
|EIP: [<e0afd746>] fd_do_task+0x396/0x420 [target_core_file] SS:ESP 0068:dea47e90

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2011-12-06 06:00:57 +00:00
..
iscsi target: remove unused struct fields 2011-12-06 06:00:56 +00:00
loopback target: remove the t_tasks_bidi se_cmd field 2011-12-06 06:00:53 +00:00
tcm_fc target: Drop config_item_name usage in fabric TFO->free_wwn() 2011-12-06 06:00:51 +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: remove unused struct fields 2011-12-06 06:00:56 +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: Fix page length in emulated INQUIRY VPD page 86h 2011-12-06 06:00:56 +00:00
target_core_cdb.h target: use ->exectute_task for all CDB emulation 2011-11-04 10:44:35 +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 the se_obj_ptr and se_orig_obj_ptr se_cmd fields 2011-12-06 06:00:52 +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 drivers/target: Add export.h to files as required. 2011-10-31 19:31:58 -04:00
target_core_file.c target/file: walk properly over sg list 2011-12-06 06:00:57 +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 drivers/target: Add module.h to drivers/target files as required. 2011-10-31 19:31:59 -04:00
target_core_hba.h
target_core_iblock.c target: remove the t_tasks_fua se_cmd field 2011-12-06 06:00:52 +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: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_pr.h target: pass the se_task to the CDB emulation callback 2011-11-04 08:00:17 +00:00
target_core_pscsi.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_pscsi.h target: cleanup pscsi request submission 2011-10-24 03:20:44 +00:00
target_core_rd.c target: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +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: Address legacy PYX_TRANSPORT_* return code breakage 2011-12-06 06:00:49 +00:00
target_core_tpg.c drivers/target: Add export.h to files as required. 2011-10-31 19:31:58 -04:00
target_core_transport.c target: remove unused struct fields 2011-12-06 06:00:56 +00:00
target_core_ua.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_ua.h