Linux filesystem development
 help / color / mirror / Atom feed
From: Matthias Goergens <matthias.goergens@gmail.com>
To: Hui Peng <benquike@gmail.com>
Cc: Anders Larsen <al@alarsen.net>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v5 0/6] fs/qnx6: fix buffer head leaks, double free, and inode validation
Date: Fri,  2 Oct 2026 15:30:19 +0800	[thread overview]
Message-ID: <20261002073019.2208696-1-matthias.goergens@gmail.com> (raw)
In-Reply-To: <20260930081947.511613-1-benquike@gmail.com>

Hi Hui,

Thanks for keeping at this series, and for taking the 1/6 wording on
board.  I think something went wrong when v5 was generated, though: it
does not apply to mainline 551c722f4080, the base your cover letter
names.  git am stops at 1/6, and git apply rejects 1/6, 2/6, 5/6 and
6/6 on their own (4/6 is reported as corrupt).  The context lines refer
to code that is not in fs/qnx6, such as a bad_inode label in
qnx6_iget() and labels out1 and out2 in super_mmi.c, so it looks as if
it came from a different tree than v4, which applied cleanly.  Could
you regenerate it from v4 on a clean checkout of mainline?

While comparing it with v4 I also noticed a few things that may have
been lost along the way:

2/6: the brelse(bh) is now inside if (!bh), where bh is NULL, so it
has no effect.  The leak v4 fixed is on the qnx6_check_blockptr()
failure path.

3/6: the bh1 = NULL and bh2 = NULL assignments from v4 are gone, so the
double brelse() comes back.  With only this 3/6 applied to mainline
(KASAN and UBSAN, under QEMU), the double-brelse image gives the same
two "Trying to free free buffer" warnings as unpatched mainline; v4
gives none.  The qs->sb_buf release itself looks right.

1/6: the text says QNX6_PTR_MAX_LEVELS is 3, but
include/linux/qnx6_fs.h defines it as 5, so inodes with 4 or 5 levels
are valid.  The check uses the macro, so only the text needs fixing.

Fixes: 1da177e4c3f4 is the 2.6.12-rc2 import, which predates qnx6, and
3377755f1064 is not in mainline.  v4's 5d026c724220 ("fs: initial
qnx6fs addition") added both inode.c and super_mmi.c.

Could you also drop my Tested-by and Reviewed-by from v5?  I haven't
been able to test it as posted, and 2/6 and 5/6 have changed since I
reviewed them.  I'll gladly re-test the next version and give them
again.

Thanks,
Matthias

      parent reply	other threads:[~2026-10-02  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  8:19 [PATCH v5 0/6] fs/qnx6: fix buffer head leaks, double free, and inode validation Hui Peng
2026-09-30  8:19 ` [PATCH v5 1/6] qnx6: validate di_filelevels in qnx6_iget() before accessing level pointers Hui Peng
2026-09-30  8:19 ` [PATCH v5 2/6] qnx6: release bh on error path in qnx6_block_map() Hui Peng
2026-09-30  8:19 ` [PATCH v5 3/6] qnx6: release bh on error path in qnx6_fill_super() Hui Peng
2026-09-30  8:19 ` [PATCH v5 4/6] qnx6: clear sb_buf after brelse in qnx6_mmi_fill_super() Hui Peng
2026-09-30  8:19 ` [PATCH v5 5/6] qnx6: abort mount on superblock magic mismatch when silent is set " Hui Peng
2026-09-30  8:19 ` [PATCH v5 6/6] qnx6: validate sb_blocksize before dividing " Hui Peng
2026-10-02  7:30 ` Matthias Goergens [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=20261002073019.2208696-1-matthias.goergens@gmail.com \
    --to=matthias.goergens@gmail.com \
    --cc=al@alarsen.net \
    --cc=benquike@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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