Hello,
syzbot found the following issue on:
HEAD commit: 8020ae3c051d Linux 5.15.103
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=10f3781cc80000
kernel config:
https://syzkaller.appspot.com/x/.config?x=f95b212e0ccdd4d1
dashboard link:
https://syzkaller.appspot.com/bug?extid=9e83328b70294112a149
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/6153dfa8dcc0/disk-8020ae3c.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/2093d52db59f/vmlinux-8020ae3c.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/85041d0bd356/Image-8020ae3c.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
[email protected]
=====================================
WARNING: bad unlock balance detected!
5.15.103-syzkaller #0 Not tainted
-------------------------------------
syz-executor.1/9497 is trying to release lock (&type->i_mutex_dir_key) at:
[<ffff800008dff3f8>] inode_unlock include/linux/fs.h:792 [inline]
[<ffff800008dff3f8>] ext4_rename fs/ext4/namei.c:4036 [inline]
[<ffff800008dff3f8>] ext4_rename2+0x2e18/0x3440 fs/ext4/namei.c:4209
but there are no more locks to release!
other info that might help us debug this:
2 locks held by syz-executor.1/9497:
#0: ffff0000d9bfc460 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:377
#1: ffff00011d62c9b8 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:822 [inline]
#1: ffff00011d62c9b8 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: lock_rename+0xf0/0x18c fs/namei.c:2967
stack backtrace:
CPU: 0 PID: 9497 Comm: syz-executor.1 Not tainted 5.15.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
print_unlock_imbalance_bug+0x250/0x2a4 kernel/locking/lockdep.c:5064
lock_release+0x56c/0xb30 kernel/locking/lockdep.c:5642
up_write+0x98/0x438 kernel/locking/rwsem.c:1593
inode_unlock include/linux/fs.h:792 [inline]
ext4_rename fs/ext4/namei.c:4036 [inline]
ext4_rename2+0x2e18/0x3440 fs/ext4/namei.c:4209
vfs_rename+0x9e0/0xe80 fs/namei.c:4736
do_renameat2+0x980/0x1040 fs/namei.c:4887
__do_sys_renameat2 fs/namei.c:4920 [inline]
__se_sys_renameat2 fs/namei.c:4917 [inline]
__arm64_sys_renameat2+0xe0/0xfc fs/namei.c:4917
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE)): count = 0x0, magic = 0xffff00011d763558, owner = 0x0, curr 0xffff0001158a9ac0, list empty
WARNING: CPU: 0 PID: 9497 at kernel/locking/rwsem.c:1342 __up_write kernel/locking/rwsem.c:1341 [inline]
WARNING: CPU: 0 PID: 9497 at kernel/locking/rwsem.c:1342 up_write+0x384/0x438 kernel/locking/rwsem.c:1594
Modules linked in:
CPU: 0 PID: 9497 Comm: syz-executor.1 Not tainted 5.15.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __up_write kernel/locking/rwsem.c:1341 [inline]
pc : up_write+0x384/0x438 kernel/locking/rwsem.c:1594
lr : __up_write kernel/locking/rwsem.c:1341 [inline]
lr : up_write+0x384/0x438 kernel/locking/rwsem.c:1594
sp : ffff800020a674e0
x29: ffff800020a674f0 x28: ffff800020a67650 x27: dfff800000000000
x26: dfff800000000000 x25: 1fffe00023aec6b8 x24: ffff00011d7635b0
x23: 0000000000000000 x22: 0000000000000000 x21: ffff0001158a9ac0
x20: ffff00011d763558 x19: ffff00011d763558 x18: 1fffe000368fc58e
x17: 1fffe000368fc58e x16: ffff800011a05534 x15: ffff800014a5f960
x14: ffff0001b47e2c80 x13: ffffffffffffffff x12: 0000000000040000
x11: 000000000003ffff x10: ffff80001f899000 x9 : 79e0b15b27dbae00
x8 : 79e0b15b27dbae00 x7 : 0000000000000000 x6 : ffff80000826caac
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff80000a9b9e00
x2 : ffff0001b47e2d10 x1 : 0000000100000000 x0 : 00000000000000bd
Call trace:
__up_write kernel/locking/rwsem.c:1341 [inline]
up_write+0x384/0x438 kernel/locking/rwsem.c:1594
inode_unlock include/linux/fs.h:792 [inline]
ext4_rename fs/ext4/namei.c:4036 [inline]
ext4_rename2+0x2e18/0x3440 fs/ext4/namei.c:4209
vfs_rename+0x9e0/0xe80 fs/namei.c:4736
do_renameat2+0x980/0x1040 fs/namei.c:4887
__do_sys_renameat2 fs/namei.c:4920 [inline]
__se_sys_renameat2 fs/namei.c:4917 [inline]
__arm64_sys_renameat2+0xe0/0xfc fs/namei.c:4917
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 4631
hardirqs last enabled at (4631): [<ffff80000837bfe8>] __call_rcu kernel/rcu/tree.c:3027 [inline]
hardirqs last enabled at (4631): [<ffff80000837bfe8>] call_rcu+0x644/0xb40 kernel/rcu/tree.c:3073
hardirqs last disabled at (4630): [<ffff80000837befc>] __call_rcu kernel/rcu/tree.c:2992 [inline]
hardirqs last disabled at (4630): [<ffff80000837befc>] call_rcu+0x558/0xb40 kernel/rcu/tree.c:3073
softirqs last enabled at (4542): [<ffff800008020e34>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (4542): [<ffff800008020e34>] __do_softirq+0xcc4/0xf60 kernel/softirq.c:587
softirqs last disabled at (4275): [<ffff8000081b7b48>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (4275): [<ffff8000081b7b48>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (4275): [<ffff8000081b7b48>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace f1a6dff738ef4b5c ]---