syzbot


WARNING: bad unlock balance in ovl_workdir_create (3)

Status: upstream: reported C repro on 2022/02/18 20:51
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+48617d87ee45a631eb2e@syzkaller.appspotmail.com
First crash: 797d, last: 427d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING: bad unlock balance in ovl_workdir_create (2) 1 1172d 1172d 0/1 auto-closed as invalid on 2021/06/08 14:33
linux-4.14 WARNING: bad unlock balance in ovl_workdir_create 2 1447d 1508d 0/1 auto-closed as invalid on 2020/09/06 18:37
Fix bisection attempts (9)
Created Duration User Patch Repo Result
2023/02/07 23:08 26m bisect fix linux-4.14.y job log (0) log
2022/10/26 20:00 30m bisect fix linux-4.14.y job log (0) log
2022/09/17 08:21 22m bisect fix linux-4.14.y job log (0) log
2022/08/18 07:04 22m bisect fix linux-4.14.y job log (0) log
2022/07/19 06:26 26m bisect fix linux-4.14.y job log (0) log
2022/06/19 05:49 23m bisect fix linux-4.14.y job log (0) log
2022/05/20 05:13 20m bisect fix linux-4.14.y job log (0) log
2022/04/20 04:48 20m bisect fix linux-4.14.y job log (0) log
2022/03/20 21:08 22m bisect fix linux-4.14.y job log (0) log

Sample crash report:
JFS: discard option not supported on device
JFS: discard option not supported on device
JFS: discard option not supported on device
overlayfs: failed to create directory ./file1/work (errno: 30); mounting read-only
=====================================
WARNING: bad unlock balance detected!
overlayfs: fs on '.' does not support file handles, falling back to index=off.
4.14.302-syzkaller #0 Not tainted
-------------------------------------
syz-executor710/8010 is trying to release lock (sb_writers) at:
[<ffffffff87081d40>] ovl_workdir_create.cold+0xeb/0xf7 fs/overlayfs/super.c:546
but there are no more locks to release!

other info that might help us debug this:
overlayfs: upper fs needs to support d_type.
1 lock held by syz-executor710/8010:
 #0:  (&type->s_umount_key#47/1){+.+.}, at: [<ffffffff81879256>] alloc_super fs/super.c:251 [inline]
 #0:  (&type->s_umount_key#47/1){+.+.}, at: [<ffffffff81879256>] sget_userns+0x556/0xc10 fs/super.c:516

stack backtrace:
overlayfs: upper fs does not support tmpfile.
CPU: 0 PID: 8010 Comm: syz-executor710 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_unlock_imbalance_bug include/trace/events/lock.h:58 [inline]
 __lock_release kernel/locking/lockdep.c:3769 [inline]
 lock_release.cold+0x70/0xbf kernel/locking/lockdep.c:4017
 ovl_workdir_create.cold+0xeb/0xf7 fs/overlayfs/super.c:546
 ovl_fill_super+0xfe9/0x2610 fs/overlayfs/super.c:988
 mount_nodev+0x4c/0xf0 fs/super.c:1180
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f7198a812c9
RSP: 002b:00007f7198a2d2f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f7198b0b7a0 RCX: 00007f7198a812c9
RDX: 0000000020000080 RSI: 0000000020000040 RDI: 0000000000000000
RBP: 00007f7198ad8118 R08: 0000000020000340 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0031656c69662f2e
R13: 3d7269647265776f R14: 0079616c7265766f R15: 00007f7198b0b7a8
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 8013 Comm: syz-executor710 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
task: ffff8880925c66c0 task.stack: ffff8880b3208000
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:328 [inline]
RIP: 0010:txBegin+0x12c/0x800 fs/jfs/jfs_txnmgr.c:379
RSP: 0018:ffff8880b320f7c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8880925c66c0 RCX: 0000000000000000
RDX: 0000000000000008 RSI: 0000000000000000 RDI: 0000000000000040
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: ffff8880925c66c0 R12: 0000000000000000
R13: ffffffff87b54600 R14: 0000000000000001 R15: ffff8880963cc380
FS:  00007f7198a2d700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559732a9c2f8 CR3: 00000000a1f6f000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __jfs_xattr_set+0x91/0x130 fs/jfs/xattr.c:928
 __vfs_setxattr+0xdc/0x130 fs/xattr.c:150
 __vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181
 __vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239
 vfs_setxattr+0xcf/0x230 fs/xattr.c:256
 ovl_do_setxattr fs/overlayfs/overlayfs.h:138 [inline]
 ovl_fill_super+0x1127/0x2610 fs/overlayfs/super.c:1023
 mount_nodev+0x4c/0xf0 fs/super.c:1180
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f7198a812c9
RSP: 002b:00007f7198a2d2f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f7198b0b7a0 RCX: 00007f7198a812c9
RDX: 0000000020000080 RSI: 0000000020000040 RDI: 0000000000000000
RBP: 00007f7198ad8118 R08: 0000000020000340 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0031656c69662f2e
R13: 3d7269647265776f R14: 0079616c7265766f R15: 00007f7198b0b7a8
Code: 83 e4 02 48 89 04 24 e8 23 05 17 ff 45 85 e4 75 65 e8 19 05 17 ff 48 8d 7d 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 26 06 00 00 48 8b 45 40 a8 04 0f 85 8a 01 00 
RIP: constant_test_bit arch/x86/include/asm/bitops.h:328 [inline] RSP: ffff8880b320f7c8
RIP: txBegin+0x12c/0x800 fs/jfs/jfs_txnmgr.c:379 RSP: ffff8880b320f7c8
---[ end trace 6ecb9adf195a2b76 ]---
----------------
Code disassembly (best guess):
   0:	83 e4 02             	and    $0x2,%esp
   3:	48 89 04 24          	mov    %rax,(%rsp)
   7:	e8 23 05 17 ff       	callq  0xff17052f
   c:	45 85 e4             	test   %r12d,%r12d
   f:	75 65                	jne    0x76
  11:	e8 19 05 17 ff       	callq  0xff17052f
  16:	48 8d 7d 40          	lea    0x40(%rbp),%rdi
  1a:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  21:	fc ff df
  24:	48 89 fa             	mov    %rdi,%rdx
  27:	48 c1 ea 03          	shr    $0x3,%rdx
* 2b:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2f:	0f 85 26 06 00 00    	jne    0x65b
  35:	48 8b 45 40          	mov    0x40(%rbp),%rax
  39:	a8 04                	test   $0x4,%al
  3b:	0f                   	.byte 0xf
  3c:	85                   	.byte 0x85
  3d:	8a 01                	mov    (%rcx),%al

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/08 18:20 linux-4.14.y c4215ee4771b 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 WARNING: bad unlock balance in ovl_workdir_create
2022/12/31 12:19 linux-4.14.y c4215ee4771b ab32d508 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 WARNING: bad unlock balance in ovl_workdir_create
2022/02/18 21:08 linux-4.14.y a35d65bedfbc 3cd800e4 .config console log report syz C ci2-linux-4-14 WARNING: bad unlock balance in ovl_workdir_create
2023/02/24 11:02 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING: bad unlock balance in ovl_workdir_create
2023/02/09 13:38 linux-4.14.y a8ad60f2af58 14a312c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING: bad unlock balance in ovl_workdir_create
2022/02/18 20:50 linux-4.14.y a35d65bedfbc 3cd800e4 .config console log report info ci2-linux-4-14 WARNING: bad unlock balance in ovl_workdir_create
* Struck through repros no longer work on HEAD.