]> Git Repo - linux.git/commit
iscsi-target: Fix residual count hanlding + remove iscsi_cmd->residual_count
authorNicholas Bellinger <[email protected]>
Wed, 16 Nov 2011 07:59:00 +0000 (23:59 -0800)
committerNicholas Bellinger <[email protected]>
Tue, 6 Dec 2011 06:00:54 +0000 (06:00 +0000)
commit7e46cf02687e40197ae07c623e660be2a2720064
tree47e6b57863e2716dfa5a6347b12a23c063e446cd
parentfef58a6096770ed6ab49103a430cc755254a74d9
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: <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Andy Grover <[email protected]>
Cc: [email protected]
Signed-off-by: Nicholas Bellinger <[email protected]>
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_core.h
This page took 0.054792 seconds and 4 git commands to generate.