Re: [syzbot] BUG: scheduling while atomic in simple_recursive_removal

From: Al Viro
Date: Thu Mar 31 2022 - 16:43:17 EST


On Wed, Mar 30, 2022 at 10:37:22AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: d888c83fcec7 fs: fix fd table size alignment properly
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=103e7b53700000
> kernel config: https://syzkaller.appspot.com/x/.config?x=cadd7063134e07bc
> dashboard link: https://syzkaller.appspot.com/bug?extid=2778a29e60b4982065a0
> compiler: aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: arm64
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+2778a29e60b4982065a0@xxxxxxxxxxxxxxxxxxxxxxxxx

Very likely to have been caused by commit 0a9a25ca7843 "block: let blkcg_gq
grab request queue's refcnt".

It had added dropping a queue refcount (which is blocking) into blkg_free(),
which is called from __blkg_release(). And that is called via call_rcu()
and thus is not allowed to block at all.