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 BA9D73451C8; Sat, 12 Sep 2026 19:51:31 +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=1789242692; cv=none; b=C26RpnCw8VY5yZ7K8KC8kaDxmxC2WvGwU2vO3/RE7ngDN/G0nrinBWCvA80To2C9DbGQR3qzZyqM7CJLqYlx/nNMh5PCYl5usVq3Uhr8Rm43LhVC+z5Pj6HvjkU0OJ179SQIsho9ehjfhb0dUu4bD/cMNOaOKGmpcN9xxEo84/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789242692; c=relaxed/simple; bh=tBPoJ439Ekr6LhUrvIv1kWbWA+OUQmbJF9OCPiQae0w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UrdiI3/IEzQAiTsewtn7CopVrj9h4jnpKu544UcwXT4vOvk60vjCf8+Qjg5CxdhPQ4qRCQeYK44bmSTbXBK+De9ICB5gF7dbm2y2C7QWX68JyUw9sHkPQmfusMQk/8njc3nSHffnW7g3ZfwwJeUou32dCfVNne4wLiqUaeK4MPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VJ74Vh9R; 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="VJ74Vh9R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20C2A1F000FF; Sat, 12 Sep 2026 19:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789242691; bh=CBxzuNYoOpKhiaXHWyiw6NMqPs+uWgLd7zjlipwIryA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VJ74Vh9RsW5598mgfyz86lWKh1VbKv4swruS5qHrlTuDhP8kAQtvOgiz+pAB2LWcc PiEbUUe9aUuNHHc2vYT5z+XeCcVswWlmIr1WeEBnADg5k1ab8KhpCrc/bL7EwhfLJW vfYs+u2+6vZ7Dr/Ai3Bg036p0O/Lh8quoKKIePSQ= 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 5.10 493/798] RDMA/srpt: Pass the mapped task attribute to target_init_cmd() Date: Sat, 12 Sep 2026 09:02:01 +0200 Message-ID: <20260912065528.438604484@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065516.948645775@linuxfoundation.org> References: <20260912065516.948645775@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 5.10-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 73256300f3ffc..4bef74e6e32f2 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1544,7 +1544,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