Re: general protection fault in open_fs_devices
From: Dmitry Vyukov
Date: Thu Jun 07 2018 - 13:03:52 EST
On Wed, Jun 6, 2018 at 6:28 PM, Anand Jain <anand.jain@xxxxxxxxxx> wrote:
>
>
> On 06/06/2018 09:17 PM, syzbot wrote:
>
>
>
> Which means there was some other thread which freed our %fs_devices.
> As this thread is still in open_ctree() so the contending thread can't
> be the ioctl(). So btrfs_free_stale_devices() is the only thread which
> can free our %fs_devices in this case.
>
> This is fixed in [1] in the mailing list.
>
> [1]
> [PATCH 3/3] btrfs: fix race between mkfs and mount
Let's tell about this syzbot:
#syz fix: btrfs: fix race between mkfs and mount