jffs2: Write of 68 bytes at 0x0001e00c failed. returned -12, retlen 0 jffs2: Not marking the space at 0x0001e00c as dirty because the flash driver returned retlen zero ===================================== WARNING: bad unlock balance detected! syzkaller #0 Not tainted ------------------------------------- syz-executor317/5670 is trying to release lock (&c->alloc_sem) at: [] jffs2_do_create+0x1ae/0xe00 fs/jffs2/write.c:474 but there are no more locks to release! other info that might help us debug this: locks held by syz-executor317/5670: 2, last CPU#0: #0: ffff888049484460 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531 #1: ffff8880144cd800 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline] #1: ffff8880144cd800 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: lookup_open+0x246/0x1970 fs/namei.c:4462 stack backtrace: CPU: 0 UID: 0 PID: 5670 Comm: syz-executor317 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_unlock_imbalance_bug+0xdc/0xf0 kernel/locking/lockdep.c:5349 __lock_release kernel/locking/lockdep.c:5590 [inline] lock_release+0x252/0x3c0 kernel/locking/lockdep.c:5964 __mutex_unlock_slowpath+0x88/0x900 kernel/locking/mutex.c:989 jffs2_do_create+0x1ae/0xe00 fs/jffs2/write.c:474 jffs2_create+0x1c8/0x320 fs/jffs2/dir.c:205 lookup_open+0xedc/0x1970 fs/namei.c:4569 open_last_lookups fs/namei.c:4768 [inline] path_openat+0x70c/0x20f0 fs/namei.c:5007 do_file_open+0x23e/0x4a0 fs/namei.c:5039 do_sys_openat2+0x115/0x200 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_creat fs/open.c:1526 [inline] __se_sys_creat fs/open.c:1520 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1520 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3e047ea0f7 Code: 48 89 fa 4c 89 df e8 98 1d 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007fff7c755290 EFLAGS: 00000202 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000555569e9a400 RCX: 00007f3e047ea0f7 RDX: 0000000000000000 RSI: 00000000000001a4 RDI: 00007f3e04827201 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007f3e04827235 R13: 00007f3e04827252 R14: 000000000000000e R15: 0000000000020000