From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Hillf Danton <hdanton@sina.com>
Cc: Edward Adam Davis <eadavis@qq.com>,
syzbot+fa90fcaa28f5cd4b1fc1@syzkaller.appspotmail.com,
clm@fb.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH next] btrfs: fix deadlock in btrfs_read_chunk_tree
Date: Thu, 26 Jun 2025 06:59:14 +0930 [thread overview]
Message-ID: <1d765fc0-e971-4c8b-95ab-4cdfcea183c8@gmx.com> (raw)
In-Reply-To: <20250625124052.1778-1-hdanton@sina.com>
在 2025/6/25 22:10, Hillf Danton 写道:
> On Wed, 25 Jun 2025 20:19:06 +0930 Qu Wenruo wrote:
>> =E5=9C=A8 2025/6/25 09:26, Hillf Danton =E5=86=99=E9=81=93:
>>> On Wed, 25 Jun 2025 06:00:09 +0930 Qu Wenruo wrote:
>>>> =3DE5=3D9C=3DA8 2025/6/25 00:00, Edward Adam Davis =3DE5=3D86=3D99=3DE9=
>> =3D81=3D93:
>>>>> Remove the lock uuid_mutex outside of sget_fc() to avoid the deadlock
>>>>> reported by [1].
>>>>> =3D20
>>>>> [1]
>>>>> -> #1 (&type->s_umount_key#41/1){+.+.}-{4:4}:
>>>>> lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
>>>>> down_write_nested+0x9d/0x200 kernel/locking/rwsem.c:1693
>>>>> alloc_super+0x204/0x970 fs/super.c:345
>>> =20
>>> Given kzalloc [3], the syzbot report is false positive (a known lockdep
>>> issue) as nobody else should acquire s->s_umount lock.
>>> =20
>>> [3] https://web.git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.=
>> git/tree/fs/super.c?id=3D7aacdf6feed1#n319
>>
>> Not a false alert either.
>>
>> sget_fc() can return an existing super block, we can race between a=20
>> mount and an unmount on the same super block.
>>
>> In that case it's going to cause problem.
>>
>> This is already fixed in the v4 (and later v5) patchset:
>>
>> https://lore.kernel.org/linux-btrfs/cover.1750724841.git.wqu@suse.com/
>>
> Can v5 survive the syzbot test?
Yes, I enabled lockdep during v5 tests.
next prev parent reply other threads:[~2025-06-25 21:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 13:11 [syzbot] [btrfs?] possible deadlock in btrfs_read_chunk_tree syzbot
2025-06-24 13:56 ` Edward Adam Davis
2025-06-24 14:27 ` syzbot
2025-06-24 14:30 ` [PATCH next] btrfs: fix " Edward Adam Davis
2025-06-24 20:30 ` Qu Wenruo
2025-06-24 23:56 ` Hillf Danton
2025-06-25 10:49 ` Qu Wenruo
2025-06-25 12:40 ` Hillf Danton
2025-06-25 21:29 ` Qu Wenruo [this message]
2025-06-25 23:44 ` Hillf Danton
2025-06-29 4:27 ` Qu Wenruo
2025-06-29 4:59 ` Hillf Danton
2025-06-29 5:05 ` Qu Wenruo
2025-06-26 6:05 ` [syzbot] [btrfs?] possible " Qu Wenruo
2025-06-26 6:37 ` syzbot
2025-06-26 8:40 ` Qu Wenruo
2025-06-26 12:30 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d765fc0-e971-4c8b-95ab-4cdfcea183c8@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=clm@fb.com \
--cc=eadavis@qq.com \
--cc=hdanton@sina.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+fa90fcaa28f5cd4b1fc1@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.