Re: WARNING: lock held when returning to user space in membarrier_private_expedited

From: Peter Zijlstra
Date: Tue Oct 01 2019 - 04:45:48 EST


On Tue, Oct 01, 2019 at 01:09:07AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: afb37288 Add linux-next specific files for 20191001
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=17619635600000
> kernel config: https://syzkaller.appspot.com/x/.config?x=659cb5bf73e72c6c
> dashboard link: https://syzkaller.appspot.com/bug?extid=6b6a46cc150b19f54ad6
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=176faa13600000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14b825cd600000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+6b6a46cc150b19f54ad6@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ================================================
> WARNING: lock held when returning to user space!
> 5.4.0-rc1-next-20191001 #0 Not tainted
> ------------------------------------------------
> syz-executor589/9088 is leaving the kernel with locks still held!
> 1 lock held by syz-executor589/9088:
> #0: ffffffff88faadc0 (rcu_read_lock){....}, at:
> membarrier_private_expedited+0x180/0x590 kernel/sched/membarrier.c:150

https://lkml.kernel.org/r/20191001071921.GJ4519@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx