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: Sun, 29 Jun 2025 13:57:43 +0930 [thread overview]
Message-ID: <9e589f47-3fa2-4479-b809-5c1b91e7356f@gmx.com> (raw)
In-Reply-To: <20250625234420.1798-1-hdanton@sina.com>
在 2025/6/26 09:14, Hillf Danton 写道:
> On Thu, 26 Jun 2025 06:59:14 +0930 Qu Wenruo wrote:
>> =E5=9C=A8 2025/6/25 22:10, Hillf Danton =E5=86=99=E9=81=93:
>>> On Wed, 25 Jun 2025 20:19:06 +0930 Qu Wenruo wrote:
>>>> =3DE5=3D9C=3DA8 2025/6/25 09:26, Hillf Danton =3DE5=3D86=3D99=3DE9=3D81=
>> =3D93:
>>>>> On Wed, 25 Jun 2025 06:00:09 +0930 Qu Wenruo wrote:
>>>>>> =3D3DE5=3D3D9C=3D3DA8 2025/6/25 00:00, Edward Adam Davis =3D3DE5=3D3D=
>> 86=3D3D99=3D3DE9=3D
>>>> =3D3D81=3D3D93:
>>>>>>> Remove the lock uuid_mutex outside of sget_fc() to avoid the deadloc=
>> k
>>>>>>> reported by [1].
>>>>>>> =3D3D20
>>>>>>> [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
>>>>> =3D20
>>>>> Given kzalloc [3], the syzbot report is false positive (a known lockde=
>> p
>>>>> issue) as nobody else should acquire s->s_umount lock.
>>>>> =3D20
>>>>> [3] https://web.git.kernel.org/pub/scm/linux/kernel/git/next/linux-nex=
>> t.=3D
>>>> git/tree/fs/super.c?id=3D3D7aacdf6feed1#n319
>>>>
>>>> Not a false alert either.
>>>>
>>>> sget_fc() can return an existing super block, we can race between a=3D2=
>> 0
>>>> 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.
>>
> Fine, feel free to show us the Tested-by syzbot gave you.
>
Here you go:
https://lore.kernel.org/linux-btrfs/685d3d4c.050a0220.2303ee.01ca.GAE@google.com/
That's based on a branch with extra patches though.
next prev parent reply other threads:[~2025-06-29 4:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 13:11 [syzbot] [btrfs?] possible " 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
2025-06-25 23:44 ` Hillf Danton
2025-06-29 4:27 ` Qu Wenruo [this message]
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=9e589f47-3fa2-4479-b809-5c1b91e7356f@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®