All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ye Chey <yechey@ai-sast.com>
Cc: linux-block@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH] pktcdvd: fix missing bio_alloc_clone NULL check in pkt_make_request_read
Date: Wed, 21 May 2025 09:13:20 -0700	[thread overview]
Message-ID: <aC37oAvMagTbRoPt@infradead.org> (raw)
In-Reply-To: <20250521123019.25282-1-yechey@ai-sast.com>

On Wed, May 21, 2025 at 08:30:19PM +0800, Ye Chey wrote:
> The bio_alloc_clone() call in pkt_make_request_read() lacks NULL check,
> which could lead to NULL pointer dereference. Add NULL check and handle
> allocation failure by calling bio_io_error().

Please explain in detail how this could ever lead to a path in
bio_alloc_clone that could return NULL and how you came to that
conclusion.

  reply	other threads:[~2025-05-21 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 12:30 [PATCH] pktcdvd: fix missing bio_alloc_clone NULL check in pkt_make_request_read Ye Chey
2025-05-21 16:13 ` Christoph Hellwig [this message]
2025-05-21 17:47   ` yechey

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=aC37oAvMagTbRoPt@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=yechey@ai-sast.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 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.