From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0663A2D0C75; Sat, 12 Sep 2026 12:24:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789215894; cv=none; b=mBNrso0JXUEu+wUwHW6k9wY92Ct35UgRDTcQ7r6sAbp5wzgMAOc4rYUNOCpBfKCyLQEkqH1wBAi2WoQIk4Jmbvi88yuC5LA538LMUfjjjkbNqMcnPauEWuJ4IRTdeZRe6isv5+xdkcF8pM3SbvMvoxipChBvg2geom9MGNZ3rVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789215894; c=relaxed/simple; bh=XYIOPgw28xw7YKPOOsHqepEu6eNY1RZRU+bydoqtzBI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tM6NkKQIepASPKuiWmElt1m9M6JSAeCdw+BN0vkb0foAbZD+Lqr1JFTSb0lCmG7jBdEltUq8yTe2dhde8EGKVACHL12reJi666SmNOQ/96KPvZ3v5Bw4b8xBfdc134DHVM2PKdQJ0QXUvLCbC906EJDNPDIK5XPAV4HrTlwfRpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AD29b1c8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AD29b1c8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B33C11F000FF; Sat, 12 Sep 2026 12:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789215892; bh=aanY3NPXPf/uoD/e+mNwMaonOwvXaMGbBpzUoYgWh4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AD29b1c8fo5qm/REfXVSwcE+mDGcUGI/dNqEzFoCRbaecjPGWg6WrNOxtySCb7bpG keejAvq9RAOWsVsTUi5XniOPSBkazVowshivDqmTXBiZI5nZwyOi+RcrnHXfp9uKSp tHmEz4wI7Fx/7ar/Z7MY0FSlwKVh65yr0b7W9Nd4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bart Van Assche , Leon Romanovsky , Sasha Levin Subject: [PATCH 6.12 0625/1376] RDMA/srpt: Pass the mapped task attribute to target_init_cmd() Date: Sat, 12 Sep 2026 08:50:51 +0200 Message-ID: <20260912065621.474804207@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Leon Romanovsky [ Upstream commit ef63cc441703412628a517dda354f3e51fe2dc92 ] srpt_handle_cmd() maps the initiator-supplied srp_cmd->task_attr into cmd->sam_task_attr, but then hands a hardcoded TCM_SIMPLE_TAG to target_init_cmd(). Pass the already mapped cmd->sam_task_attr instead, so target core sees the attribute the initiator requested. Fixes: 9474b043132f ("ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx->kref") Link: https://patch.msgid.link/20260721-b4-scsi-ordering-violation-due-to-hardc-v1-1-07205aab71bb@nvidia.com Reviewed-by: Bart Van Assche Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index f3e35dfdb30b0..a289512560c5f 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1603,7 +1603,7 @@ static void srpt_handle_cmd(struct srpt_rdma_ch *ch, rc = target_init_cmd(cmd, ch->sess, &send_ioctx->sense_data[0], scsilun_to_int(&srp_cmd->lun), data_len, - TCM_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF); + cmd->sam_task_attr, dir, TARGET_SCF_ACK_KREF); if (rc != 0) { pr_debug("target_submit_cmd() returned %d for tag %#llx\n", rc, srp_cmd->tag); -- 2.53.0