Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64fe4f4f authored by Roland Dreier's avatar Roland Dreier Committed by Nicholas Bellinger
Browse files

iscsi-target: Fix CmdSN comparison (use cmd->cmd_sn instead of cmd->stat_sn)



Commit 64c13330 ("iscsi-target: Fix bug in handling of ExpStatSN
ACK during u32 wrap-around") introduced a bug where we compare the
wrong SN against our ExpCmdSN.

Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 5a3b6fc0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn)
		 * made generic here.
		 */
		if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd &&
		     iscsi_sna_gte(cmd->stat_sn, conn->sess->exp_cmd_sn)) {
		     iscsi_sna_gte(cmd->cmd_sn, conn->sess->exp_cmd_sn)) {
			list_del(&cmd->i_conn_node);
			spin_unlock_bh(&conn->cmd_lock);
			iscsit_free_cmd(cmd);