From: Leon Romanovsky <leon@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>,
Yehyeong Lee <yhlee@isslab.korea.ac.kr>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3 0/2] RDMA/srp: bound the receive IU the target asks for
Date: Mon, 09 Nov 2026 06:30:03 -0500 [thread overview]
Message-ID: <179422380363.232605.7836961018401691588.b4-ty@kernel.org> (raw)
In-Reply-To: <20261102061938.617371-1-yhlee@isslab.korea.ac.kr>
On Mon, 02 Nov 2026 15:19:36 +0900, Yehyeong Lee wrote:
> The target decides how large the initiator's receive buffers are, and the
> initiator never checks the answer.
>
> srp_cm_rep_handler() takes max_ti_iu_len out of the SRP_LOGIN_RSP and
> srp_alloc_iu_bufs() sizes every receive IU with it. The first patch refuses
> a login that reports less than an SRP_RSP, because such a login hands the
> receive path undersized buffers, and a report of zero is worse: kzalloc()
> answers it with ZERO_SIZE_PTR, which ib_dma_map_single() accepts on a
> virtually mapped transport without looking at the length.
>
> [...]
Applied, thanks!
[1/2] RDMA/srp: refuse a target that cannot receive an SRP_RSP
https://git.kernel.org/rdma/rdma/c/bac7e7bf07cb64
[2/2] RDMA/srp: do not DMA-sync a receive IU past its mapped length
https://git.kernel.org/rdma/rdma/c/915fb85a378e02
Best regards,
--
Leon Romanovsky <leon@kernel.org>
prev parent reply other threads:[~2026-11-09 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 6:19 Yehyeong Lee
2026-11-02 6:19 ` [PATCH v3 1/2] RDMA/srp: refuse a target that cannot receive an SRP_RSP Yehyeong Lee
2026-11-02 6:19 ` [PATCH v3 2/2] RDMA/srp: do not DMA-sync a receive IU past its mapped length Yehyeong Lee
2026-11-09 11:30 ` Leon Romanovsky [this message]
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=179422380363.232605.7836961018401691588.b4-ty@kernel.org \
--to=leon@kernel.org \
--cc=bvanassche@acm.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=stable@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®