]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi-target: Fix bug in handling of ExpStatSN ACK during u32 wrap-around
authorSteve Hodgson <steve@purestorage.com>
Tue, 6 Nov 2012 02:02:41 +0000 (18:02 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 8 Nov 2012 04:12:07 +0000 (20:12 -0800)
commit50df140fc8d11505858e3d2c3ce344e01a543ca3
tree830b0a2bee8e3c8ba7318a978d07916e90fad34e
parent7b39afb459cb69cf0794fd16692205be027cf055
iscsi-target: Fix bug in handling of ExpStatSN ACK during u32 wrap-around

This patch fixes a bug in the hanlding of initiator provided ExpStatSN and
individual iscsi_cmd->stat_sn comparision during iscsi_conn->stat_sn
wrap-around within iscsit_ack_from_expstatsn() code.

This bug would manifest itself as iscsi_cmd descriptors not being Acked
by a lower ExpStatSn, causing them to be leaked until an iSCSI connection
or session reinstatement event occurs to release all commands.

Also fix up two other uses of incorrect CmdSN SNA comparison to use wrapper
usage from include/scsi/iscsi_proto.h.

Signed-off-by: Steve Hodgson <steve@purestorage.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_erl2.c
drivers/target/iscsi/iscsi_target_tmr.c