Re: [PATCH v5] hfs: update sanity check of the root record

From: George Anthony Vernon

Date: Sat Mar 28 2026 - 18:12:16 EST


On Sat, Mar 28, 2026 at 04:12:07PM +0900, Tetsuo Handa wrote:
> George Anthony Vernon is trying to fix this bug without my patch
> ( https://lkml.kernel.org/r/20260311211309.27856-1-contact@xxxxxxxxxxx ).
> But it was proven that George's patch cannot fix this bug. Therefore,
> I believe that we came to a conclusion that applying my patch is
> the way to go. We can apply George's patch as a further improvement.
> But unfortunately Viacheslav Dubeyko (the maintainer of HFS) is not
> responding. Therefore, I'm sending this patch to more developers who
> might accept this patch, instead of waiting for Viacheslav.
Thanks for the CC. Slava (Viacheslav) got in contact with me directly on
Tuesday 24th to say he missed some emails and acknowledged not being
completely correct about the thread record logic which we were talking
about. He indicated he would take a look at the next patch version when
he received it.

I will follow this thread with interest. In the meantime I will follow
up my patch with a new version, thanks for your review of it.

Your patch validates the superblock lookup, however my patch which you
linked validates reserved CNIDs retrieved from a bad cat record on disk,
which is also a reachable logical path which hits the BUG() on
writeback. I can consistently reproduce that BUG() with your patch
applied.

Both patches are therefore necessary.

Hope this helps,

George