WARNING: lock held when returning to user space in ovl_write_iter

From: syzbot
Date: Sun Mar 01 2020 - 14:13:27 EST


Hello,

syzbot found the following crash on:

HEAD commit: bdc5461b Add linux-next specific files for 20200224
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=10deee65e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8402e437f1eeea92
dashboard link: https://syzkaller.appspot.com/bug?extid=9331a354f4f624a52a55
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1571d22de00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=175192c3e00000

The bug was bisected to:

commit 2406a307ac7ddfd7effeeaff6947149ec6a95b4e
Author: Jiufei Xue <jiufei.xue@xxxxxxxxxxxxxxxxx>
Date: Wed Nov 20 09:45:26 2019 +0000

ovl: implement async IO routines

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=113c6d29e00000
final crash: https://syzkaller.appspot.com/x/report.txt?x=133c6d29e00000
console output: https://syzkaller.appspot.com/x/log.txt?x=153c6d29e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+9331a354f4f624a52a55@xxxxxxxxxxxxxxxxxxxxxxxxx
Fixes: 2406a307ac7d ("ovl: implement async IO routines")

================================================
WARNING: lock held when returning to user space!
5.6.0-rc2-next-20200224-syzkaller #0 Not tainted
------------------------------------------------
syz-executor184/10029 is leaving the kernel with locks still held!
1 lock held by syz-executor184/10029:
#0: ffff88809987c418 (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2903 [inline]
#0: ffff88809987c418 (sb_writers#3){.+.+}, at: ovl_write_iter+0xcc1/0x1090 fs/overlayfs/file.c:348


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxxx

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches