Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Yun Zhou <yun.zhou@windriver.com>
Cc: cem@kernel.org, djwong@kernel.org, hch@infradead.org,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: handle NULL b_addr in xfs_buf_free
Date: Mon, 20 Jul 2026 01:00:01 -0700	[thread overview]
Message-ID: <al3VgW1ijbMf2P2k@infradead.org> (raw)
In-Reply-To: <20260719151124.3514077-1-yun.zhou@windriver.com>

On Sun, Jul 19, 2026 at 11:11:24PM +0800, Yun Zhou wrote:
> When xfs_buf_alloc_backing_mem() fails, xfs_buf_free() is called with
> bp->b_addr still NULL.  The code falls through to the folio_put path
> which calls virt_to_folio(NULL), dereferencing an invalid address and
> causing a kernel crash.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


  reply	other threads:[~2026-07-20  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-19 15:11 [PATCH] xfs: handle NULL b_addr in xfs_buf_free Yun Zhou
2026-07-20  8:00 ` Christoph Hellwig [this message]
2026-07-21 10:44 ` Carlos Maiolino

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=al3VgW1ijbMf2P2k@infradead.org \
    --to=hch@infradead.org \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=yun.zhou@windriver.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