Re: [PATCH] ocfs2: validate allocator type to prevent BUG_ON in ocfs2_block_group_search

From: Deepanshu Kartikey

Date: Sat Jan 10 2026 - 00:38:30 EST


On Thu, Jan 8, 2026 at 1:55 PM Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx> wrote:
>
>
>
> On 2026/1/4 09:40, Deepanshu Kartikey wrote:
> > A corrupted filesystem image can have an inode allocator with the
> > OCFS2_BITMAP_FL flag incorrectly set, making ocfs2_is_cluster_bitmap()
> > return true. When the code later calls ocfs2_block_group_search(),
> > it triggers BUG_ON(ocfs2_is_cluster_bitmap(inode)) causing a kernel panic.
> >
> But ocfs2_is_cluster_bitmap() checks ip_blkno.
>
> Thanks,
> Joseph
>

Hi Joseph,

Thanks for the correction. You're right, ocfs2_is_cluster_bitmap()
compares ip_blkno with osb->bitmap_blkno, not a flag.

I will send a v2 with the corrected commit message.

Thanks, Deepanshu