Re: null-ptr-deref due to "ext4: fix potential race between online resizing and write operations"
From: Theodore Y. Ts'o
Date: Fri Feb 21 2020 - 19:34:06 EST
On Fri, Feb 21, 2020 at 07:58:01PM +0000, Jitindar SIngh, Suraj wrote:
> On Fri, 2020-02-21 at 09:02 -0500, Qian Cai wrote:
> > Reverted the linux-next commit c20bac9bf82c ("ext4: fix potential
> > race between
> > s_flex_groups online resizing and access") fixed the crash below
> > (with line
> > numbers),
>
> Good catch, this is a bug where the dereference of the array
> s_flex_groups needs to happen after the "if (flex_size > 1)" if
> statement in fs/ext4/ialloc.c:373
Cai, thanks for noting the problem! Suraj, I've fixed up the patch on
the ext4.git tree.
- Ted