diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-30 04:04:01 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-04 16:51:17 +0800 |
commit | 1aa58ccd029fc75c115ae35c3fcb4d43043c0725 (patch) | |
tree | 289d3918fa68a40168f20bb06016a8caec1b7e95 /drivers/infiniband | |
parent | 6655d76ecb91fa618c4d0d0dd653e94078b3f050 (diff) | |
download | linux-3.10-1aa58ccd029fc75c115ae35c3fcb4d43043c0725.tar.gz linux-3.10-1aa58ccd029fc75c115ae35c3fcb4d43043c0725.tar.bz2 linux-3.10-1aa58ccd029fc75c115ae35c3fcb4d43043c0725.zip |
iscsi-target: Fix iscsit_add_reject* usage for iser
commit ba159914086f06532079fc15141f46ffe7e04a41 upstream
This patch changes iscsit_add_reject() + iscsit_add_reject_from_cmd()
usage to not sleep on iscsi_cmd->reject_comp to address a free-after-use
usage bug in v3.10 with iser-target code.
It saves ->reject_reason for use within iscsit_build_reject() so the
correct value for both transport cases. It also drops the legacy
fail_conn parameter usage throughput iscsi-target code and adds
two iscsit_add_reject_cmd() and iscsit_reject_cmd helper functions,
along with various small cleanups.
(v2: Re-enable target_put_sess_cmd() to be called from
iscsit_add_reject_from_cmd() for rejects invoked after
target_get_sess_cmd() has been called)
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index bfc21798bd5..4f6faf0915d 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -957,11 +957,6 @@ sequence_cmd: if (!rc && dump_payload == false && unsol_data) iscsit_set_unsoliticed_dataout(cmd); - if (rc == CMDSN_ERROR_CANNOT_RECOVER) - return iscsit_add_reject_from_cmd( - ISCSI_REASON_PROTOCOL_ERROR, - 1, 0, (unsigned char *)hdr, cmd); - return 0; } |