iser-target: remove command with state ISTATE_REMOVE
authorJenny Derzhavetz <jennyf@mellanox.com>
Sun, 6 Sep 2015 11:52:20 +0000 (14:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:11 +0000 (14:43 -0700)
commit060f45157d2a43dffd51a10e9707336f58ae34b7
treedaae1799a77b3856b860f1c9ee142f4959632869
parent57bc4a2d5be815c3b917fdf54a2013e8df565e42
iser-target: remove command with state ISTATE_REMOVE

commit a4c15cd957cbd728f685645de7a150df5912591a upstream.

As documented in iscsit_sequence_cmd:
/*
 * Existing callers for iscsit_sequence_cmd() will silently
 * ignore commands with CMDSN_LOWER_THAN_EXP, so force this
 * return for CMDSN_MAXCMDSN_OVERRUN as well..
 */

We need to silently finish a command when it's in ISTATE_REMOVE.
This fixes an teardown hang we were seeing where a mis-behaved
initiator (triggered by allocation error injections) sent us a
cmdsn which was lower than expected.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/isert/ib_isert.c