Re: [syzbot] [btrfs?] KASAN: slab-use-after-free Read in btrfs_open_devices

From: David Sterba
Date: Tue Aug 08 2023 - 14:25:51 EST


On Tue, Aug 08, 2023 at 06:01:41PM +0200, Christoph Hellwig wrote:
> Yes, probably. The lifetimes looked fishy to me to start with, but
> this might have made things worse.

The locking rules for device structures are not following any commonly
found patterns so it's easy to break it. We've spent a lot of time
chasing races reported by syzbot, so please hold on with this patch
before a final merge. Keeping it in for-next for testing is OK.