Re: [syzbot] INFO: rcu detected stall in sys_setxattr (2)

From: Christian Brauner
Date: Wed Apr 20 2022 - 04:14:34 EST


On Tue, Apr 19, 2022 at 09:16:20AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: b2d229d4ddb1 Linux 5.18-rc3
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=144417ccf00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6cb89c879305f336
> dashboard link: https://syzkaller.appspot.com/bug?extid=10a16d1c43580983f6a2
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=104a88e8f00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=132a840cf00000
>
> The issue was bisected to:
>
> commit e257039f0fc7da36ac3a522ef9a5cb4ae7852e67
> Author: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> Date: Tue Mar 1 04:04:20 2022 +0000
>
> mount_setattr(): clean the control flow and calling conventions
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16b313c0f00000
> final oops: https://syzkaller.appspot.com/x/report.txt?x=15b313c0f00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11b313c0f00000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+10a16d1c43580983f6a2@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: e257039f0fc7 ("mount_setattr(): clean the control flow and calling conventions")

This suspiciously looks like in the case of failing to make a single
read-write mount read-only we don't unset MNT_WRITE_HOLD in the new
error path that Al added.

Just saw that Hilf was testing a patch to this effect as well so putting
him on this thread.

Hilf, are you working on a fix for this I can pick up from you later or
should I come up with a patch?

Christian