2020-03-01 19:13:58

by syzbot

[permalink] [raw]
Subject: WARNING: lock held when returning to user space in ovl_write_iter

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 <[email protected]>
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: [email protected]
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 [email protected].

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


2020-03-12 15:31:23

by Miklos Szeredi

[permalink] [raw]
Subject: Re: WARNING: lock held when returning to user space in ovl_write_iter

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
63623fd4


Attachments:
ovl-fix-lockdep-warning-for-async-write.patch (1.38 kB)

2020-03-12 18:37:11

by syzbot

[permalink] [raw]
Subject: Re: WARNING: lock held when returning to user space in ovl_write_iter

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger crash:

Reported-and-tested-by: [email protected]

Tested on:

commit: 63623fd4 Merge tag 'for-linus' of git://git.kernel.org/pub..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config: https://syzkaller.appspot.com/x/.config?x=9833e26bab355358
dashboard link: https://syzkaller.appspot.com/bug?extid=9331a354f4f624a52a55
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
patch: https://syzkaller.appspot.com/x/patch.diff?x=134ceef9e00000

Note: testing is done by a robot and is best-effort only.

2020-03-13 08:54:49

by Miklos Szeredi

[permalink] [raw]
Subject: Re: WARNING: lock held when returning to user space in ovl_write_iter

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
63623fd4


Attachments:
ovl-fix-lockdep-warning-for-async-write.patch (822.00 B)