The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Caleb Sander Mateos <csander@purestorage.com>,
	Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>, Hannes Reinecke <hare@suse.de>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] nvme-tcp: fix signedness bug in nvme_tcp_init_connection()
Date: Wed, 5 Mar 2025 11:39:08 -0700	[thread overview]
Message-ID: <Z8iaTC4aGPRuZSfI@kbusch-mbp> (raw)
In-Reply-To: <d3661d33-096a-45e3-8304-1123fd031527@stanley.mountain>

On Wed, Mar 05, 2025 at 06:52:59PM +0300, Dan Carpenter wrote:
> The kernel_recvmsg() function returns an int which could be either
> negative error codes or the number of bytes received.  The problem is
> that the condition:
> 
>         if (ret < sizeof(*icresp)) {
> 
> is type promoted to type unsigned long and negative values are treated
> as high positive values which is success, when they should be treated as
> failure.  Handle invalid positive returns separately from negative
> error codes to avoid this problem.

Thanks, applied to nvme-6.14.

I had v1 applied previously, and it was the top commit in that tree;
force pushed this version to replace it.

      parent reply	other threads:[~2025-03-05 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 15:52 [PATCH v2] nvme-tcp: fix signedness bug in nvme_tcp_init_connection() Dan Carpenter
2025-03-05 15:58 ` Caleb Sander Mateos
2025-03-05 18:39 ` Keith Busch [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=Z8iaTC4aGPRuZSfI@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=dan.carpenter@linaro.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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