From: Maurizio Lombardi <mlombard@redhat.com>
To: kbusch@kernel.org
Cc: linux-nvme@lists.infradead.org, dwagner@suse.de,
yjshin0438@gmail.com, hare@suse.de, sagi@grimberg.me,
chaitanyak@nvidia.com, mlombard@arkamax.eu
Subject: [PATCH V2 0/2] nvmet-tcp: fix receive path error handling and state machine
Date: Thu, 12 Mar 2026 14:40:55 +0100 [thread overview]
Message-ID: <20260312134057.110274-1-mlombard@redhat.com> (raw)
Patch 1 fixes a potential issue where network data could be read into an
uninitialized iterator. Currently, nvmet_tcp_build_pdu_iovec() returns void,
meaning callers are unaware if an out-of-bounds PDU length or offset triggers
an early return. Consequently, callers blindly overwrite the queue state to
NVMET_TCP_RECV_DATA. This patch modifies the function to return an error code,
shifting the handling responsibility to the callers to ensure proper socket
teardown.
Patch 2 cleans up redundant, localized calls to nvmet_tcp_fatal_error() scattered
across the receive path. It delegates the responsibility of executing the fatal
error function to the top-level caller by bubbling up the error codes.
V2: some cosmetic changes to Patch 1, no functional changes.
Maurizio Lombardi (2):
nvmet-tcp: propagate nvmet_tcp_build_pdu_iovec() errors to its callers
nvmet-tcp: remove redundant calls to nvmet_tcp_fatal_error()
drivers/nvme/target/tcp.c | 73 ++++++++++++++++++---------------------
1 file changed, 34 insertions(+), 39 deletions(-)
--
2.53.0
next reply other threads:[~2026-03-12 13:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 13:40 Maurizio Lombardi [this message]
2026-03-12 13:40 ` [PATCH V2 1/2] nvmet-tcp: propagate nvmet_tcp_build_pdu_iovec() errors to its callers Maurizio Lombardi
2026-03-13 7:10 ` Hannes Reinecke
2026-03-13 7:45 ` Maurizio Lombardi
2026-03-13 8:11 ` Hannes Reinecke
2026-03-12 13:40 ` [PATCH V2 2/2] nvmet-tcp: remove redundant calls to nvmet_tcp_fatal_error() Maurizio Lombardi
2026-03-13 7:20 ` Hannes Reinecke
2026-03-13 7:51 ` Maurizio Lombardi
2026-03-13 8:11 ` Hannes Reinecke
2026-03-13 8:14 ` Maurizio Lombardi
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=20260312134057.110274-1-mlombard@redhat.com \
--to=mlombard@redhat.com \
--cc=chaitanyak@nvidia.com \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mlombard@arkamax.eu \
--cc=sagi@grimberg.me \
--cc=yjshin0438@gmail.com \
/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