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

Commit cd931ee6 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

iscsi-target: Fix double list_add with iscsit_alloc_buffs reject



This patch fixes a bug where the iscsit_add_reject_from_cmd() call
from a failure to iscsit_alloc_buffs() was incorrectly passing
add_to_conn=1 and causing a double list_add after iscsi_cmd->i_list
had already been added in iscsit_handle_scsi_cmd().

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent c1ce4bd5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1061,7 +1061,7 @@ static int iscsit_handle_scsi_cmd(
	if (ret < 0)
	if (ret < 0)
		return iscsit_add_reject_from_cmd(
		return iscsit_add_reject_from_cmd(
				ISCSI_REASON_BOOKMARK_NO_RESOURCES,
				ISCSI_REASON_BOOKMARK_NO_RESOURCES,
				1, 1, buf, cmd);
				1, 0, buf, cmd);
	/*
	/*
	 * Check the CmdSN against ExpCmdSN/MaxCmdSN here if
	 * Check the CmdSN against ExpCmdSN/MaxCmdSN here if
	 * the Immediate Bit is not set, and no Immediate
	 * the Immediate Bit is not set, and no Immediate