All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yehyeong Lee" <yhlee@isslab.korea.ac.kr>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH 2/2] RDMA/srp: drop a truncated SRP_RSP
Date: Sun, 25 Oct 2026 11:57:04 +0000	[thread overview]
Message-ID: <sashiko-outbox-184199@kernel.org> (raw)
In-Reply-To: <20261025114155.4007867-3-yhlee@isslab.korea.ac.kr>

> srp_process_rsp() reads the whole 36 byte SRP_RSP header, the tag, the
> credit delta, the flags, the status, the residual counts and the two data
> lengths, without ever checking how many bytes the target actually sent.
> Its two siblings, srp_process_cred_req() and srp_process_aer_req(), both
> refuse a message shorter than their header.
> 
> A short response therefore makes the initiator parse whatever the receive
> IU happened to hold from an earlier response, since the IUs are reused, and
> act on a stale tag, status and residual count.
> 
> Refuse it the same way the siblings do. A conforming target always sends at
> least the header, because a response shorter than that carries no tag to
> complete a command with.
> 
> Fixes: aef9ec39c47f ("IB: Add SCSI RDMA Protocol (SRP) initiator")
> Cc: stable@vger.kernel.org
> Signed-off-by: Yehyeong Lee <yhlee@isslab.korea.ac.kr>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261025114155.4007867-1-yhlee@isslab.korea.ac.kr?part=2


  reply	other threads:[~2026-10-25 11:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 11:41 [PATCH 0/2] RDMA/srp: bound the receive IU the target asks for Yehyeong Lee
2026-10-25 11:41 ` [PATCH 1/2] RDMA/srp: refuse a target that cannot receive an SRP_RSP Yehyeong Lee
2026-10-25 11:59   ` sashiko-bot
2026-10-25 14:18   ` Bart Van Assche
2026-10-25 11:41 ` [PATCH 2/2] RDMA/srp: drop a truncated SRP_RSP Yehyeong Lee
2026-10-25 11:57   ` sashiko-bot [this message]
2026-10-25 14:20   ` Bart Van Assche
2026-10-26  5:20 ` [PATCH v2 0/2] RDMA/srp: bound the receive IU the target asks for Yehyeong Lee
2026-10-26  5:20   ` [PATCH v2 1/2] RDMA/srp: refuse a target that cannot receive an SRP_RSP Yehyeong Lee
2026-10-26  9:05     ` sashiko-bot
2026-10-26  5:20   ` [PATCH v2 2/2] RDMA/srp: do not DMA-sync a receive IU past its mapped length Yehyeong Lee
2026-10-26  9:14     ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-184199@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yhlee@isslab.korea.ac.kr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.