]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:45:57 +0000 (08:45 -0800)
commitb81446dc304c2ee93fe15c8b87dc56c0ebad89d5
treed9841b025e9ba205c957fb27db8342b668711ac5
parent31e015990c4645d43db93c159495979c3f8601a7
iscsi-target: Fix bug in handling of ExpStatSN ACK during u32 wrap-around

commit 64c13330a38935120501b19c97a3e6095747c7a1 upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_erl2.c
drivers/target/iscsi/iscsi_target_tmr.c