From: Nicholas Bellinger Date: Wed, 16 Nov 2011 07:59:00 +0000 (-0800) Subject: iscsi-target: Fix residual count hanlding + remove iscsi_cmd->residual_count X-Git-Tag: v3.2-rc5~31^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e46cf02687e40197ae07c623e660be2a2720064;p=pandora-kernel.git iscsi-target: Fix residual count hanlding + remove iscsi_cmd->residual_count This patch fixes iscsi-target handling of underflow where residual data is causing an OOPs by using the incorrect iscsi_cmd_t->data_length initially assigned in iscsit_allocate_se_cmd(). It resets iscsi_cmd_t->data_length from se_cmd_t->data_length after transport_generic_allocate_tasks() has been invoked in iscsit_handle_scsi_cmd() RX context, and converts iscsi_cmd->residual_count usage to access iscsi_cmd->se_cmd.residual_count to get the proper residual count set by target-core. Reported-by: Cc: Christoph Hellwig Cc: Andy Grover Cc: stable@kernel.org Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed