linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel BUG at lib/lockref.c:LINE!
@ 2019-07-08 19:37 syzbot
  2019-07-08 20:29 ` Al Viro
  2019-07-08 20:50 ` syzbot
  0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2019-07-08 19:37 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, syzkaller-bugs, viro

Hello,

syzbot found the following crash on:

HEAD commit:    d58b5ab9 Add linux-next specific files for 20190708
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=123d6887a00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=bf9882946ecc11d9
dashboard link: https://syzkaller.appspot.com/bug?extid=f70e9b00f8c7d4187bd0
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=173375c7a00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1536f9bfa00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+f70e9b00f8c7d4187bd0@syzkaller.appspotmail.com

------------[ cut here ]------------
kernel BUG at lib/lockref.c:189!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9350 Comm: syz-executor444 Not tainted 5.2.0-next-20190708 #33
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
RIP: 0010:lockref_mark_dead lib/lockref.c:189 [inline]
RIP: 0010:lockref_mark_dead+0x8b/0xa0 lib/lockref.c:187
Code: 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 04 3c 03  
7e 1d c7 43 38 80 ff ff ff 5b 41 5c 5d c3 e8 75 19 38 fe <0f> 0b 48 89 df  
e8 0b 59 72 fe eb ab e8 a4 59 72 fe eb dc 90 90 55
RSP: 0018:ffff88809004fc90 EFLAGS: 00010293
RAX: ffff88808bcc0300 RBX: ffff8880a69b0520 RCX: ffffffff833a3abf
RDX: 0000000000000000 RSI: ffffffff833a3afb RDI: 0000000000000005
RBP: ffff88809004fca0 R08: ffff88808bcc0300 R09: ffffed1014d360a5
R10: ffffed1014d360a4 R11: ffff8880a69b0523 R12: 0000000000000000
R13: ffff8880a69b0520 R14: ffff8880a69b04a0 R15: 0000000000000000
FS:  000055555571f880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555738938 CR3: 0000000091be1000 CR4: 00000000001406f0
Call Trace:
  __dentry_kill+0x5f/0x600 fs/dcache.c:560
  shrink_dcache_parent+0x2c9/0x3d0 fs/dcache.c:1565
  vfs_rmdir fs/namei.c:3882 [inline]
  vfs_rmdir+0x26f/0x4f0 fs/namei.c:3857
  do_rmdir+0x39e/0x420 fs/namei.c:3940
  __do_sys_rmdir fs/namei.c:3958 [inline]
  __se_sys_rmdir fs/namei.c:3956 [inline]
  __x64_sys_rmdir+0x36/0x40 fs/namei.c:3956
  do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441917
Code: 0f 1f 00 b8 57 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 09 fc ff c3  
66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 54 00 00 00 0f 05 <48> 3d 01 f0 ff  
ff 0f 83 8d 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe53fc08f8 EFLAGS: 00000207 ORIG_RAX: 0000000000000054
RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 0000000000441917
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffe53fc1a90
RBP: 00000000000024ef R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000005 R11: 0000000000000207 R12: 00007ffe53fc1a90
R13: 00005555557288c0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 407254279c8c4b61 ]---
RIP: 0010:lockref_mark_dead lib/lockref.c:189 [inline]
RIP: 0010:lockref_mark_dead+0x8b/0xa0 lib/lockref.c:187
Code: 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 04 3c 03  
7e 1d c7 43 38 80 ff ff ff 5b 41 5c 5d c3 e8 75 19 38 fe <0f> 0b 48 89 df  
e8 0b 59 72 fe eb ab e8 a4 59 72 fe eb dc 90 90 55
RSP: 0018:ffff88809004fc90 EFLAGS: 00010293
RAX: ffff88808bcc0300 RBX: ffff8880a69b0520 RCX: ffffffff833a3abf
RDX: 0000000000000000 RSI: ffffffff833a3afb RDI: 0000000000000005
RBP: ffff88809004fca0 R08: ffff88808bcc0300 R09: ffffed1014d360a5
R10: ffffed1014d360a4 R11: ffff8880a69b0523 R12: 0000000000000000
R13: ffff8880a69b0520 R14: ffff8880a69b04a0 R15: 0000000000000000
FS:  000055555571f880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555738938 CR3: 0000000091be1000 CR4: 00000000001406f0


---
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@googlegroups.com.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel BUG at lib/lockref.c:LINE!
  2019-07-08 19:37 kernel BUG at lib/lockref.c:LINE! syzbot
@ 2019-07-08 20:29 ` Al Viro
  2019-07-08 20:50 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: Al Viro @ 2019-07-08 20:29 UTC (permalink / raw)
  To: syzbot; +Cc: linux-fsdevel, linux-kernel, syzkaller-bugs

On Mon, Jul 08, 2019 at 12:37:06PM -0700, syzbot wrote:
> Hello,
> 
> syzbot found the following crash on:
> 
> HEAD commit:    d58b5ab9 Add linux-next specific files for 20190708
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=123d6887a00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=bf9882946ecc11d9
> dashboard link: https://syzkaller.appspot.com/bug?extid=f70e9b00f8c7d4187bd0
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=173375c7a00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1536f9bfa00000
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+f70e9b00f8c7d4187bd0@syzkaller.appspotmail.com
> 
> ------------[ cut here ]------------
> kernel BUG at lib/lockref.c:189!

Mea culpa...  It's "Teach shrink_dcache_parent() to cope with mixed-filesystem
shrink lists", and the fix should be simply this:

diff --git a/fs/dcache.c b/fs/dcache.c
index d8732cf2e302..d85d8f2c8c97 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1555,6 +1555,7 @@ void shrink_dcache_parent(struct dentry *parent)
 		d_walk(parent, &data, select_collect2);
 		if (data.victim) {
 			struct dentry *parent;
+			spin_lock(&data.victim->d_lock);
 			if (!shrink_lock_dentry(data.victim)) {
 				rcu_read_unlock();
 			} else {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: kernel BUG at lib/lockref.c:LINE!
  2019-07-08 19:37 kernel BUG at lib/lockref.c:LINE! syzbot
  2019-07-08 20:29 ` Al Viro
@ 2019-07-08 20:50 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2019-07-08 20:50 UTC (permalink / raw)
  To: arvid.brodin, darrick.wong, davem, linux-fsdevel, linux-kernel,
	linux-xfs, netdev, sfr, syzkaller-bugs, viro

syzbot has bisected this bug to:

commit 867c90eeea9d81ad1336881b61a4dcf692fc5d50
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date:   Mon Jul 8 00:22:38 2019 +0000

     Merge remote-tracking branch 'xfs/for-next'

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=16c69bc3a00000
start commit:   d58b5ab9 Add linux-next specific files for 20190708
git tree:       linux-next
final crash:    https://syzkaller.appspot.com/x/report.txt?x=15c69bc3a00000
console output: https://syzkaller.appspot.com/x/log.txt?x=11c69bc3a00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=bf9882946ecc11d9
dashboard link: https://syzkaller.appspot.com/bug?extid=f70e9b00f8c7d4187bd0
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=173375c7a00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1536f9bfa00000

Reported-by: syzbot+f70e9b00f8c7d4187bd0@syzkaller.appspotmail.com
Fixes: 867c90eeea9d ("Merge remote-tracking branch 'xfs/for-next'")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-08 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 19:37 kernel BUG at lib/lockref.c:LINE! syzbot
2019-07-08 20:29 ` Al Viro
2019-07-08 20:50 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).