syzbot


WARNING: locking bug in f2fs_getxattr (2)

Status: upstream: reported on 2024/09/21 04:07
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+44090b62afaabafe828a@syzkaller.appspotmail.com
First crash: 65d, last: 11d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly f2fs report (Nov 2024) 0 (1) 2024/11/18 12:39
[syzbot] [f2fs?] WARNING: locking bug in f2fs_getxattr (2) 0 (1) 2024/09/21 04:07
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: locking bug in f2fs_getxattr f2fs 72 147d 187d 0/28 auto-obsoleted due to no activity on 2024/09/04 12:08

Sample crash report:
syz.1.136 (7243): drop_caches: 2
------------[ cut here ]------------
Looking for class "lock" with key init_kmem_cache_cpus.__key, but found a different class "&c->lock" with the same key
WARNING: CPU: 1 PID: 7243 at kernel/locking/lockdep.c:939 look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936
Modules linked in:
CPU: 1 UID: 0 PID: 7243 Comm: syz.1.136 Not tainted 6.12.0-rc6-syzkaller-g563047e691f2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936
lr : look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936
sp : ffff80009e416e20
x29: ffff80009e416e20 x28: dfff800000000000 x27: 0000000000000000
x26: ffff8000973358c0 x25: ffff800097335000 x24: 0000000000000001
x23: 0000000000000000 x22: 1ffff00011f020ba x21: ffff800097396690
x20: fffffdffbf707e90 x19: ffff800092e085b0 x18: 0000000000000008
x17: 7562202c79656b5f x16: ffff8000830cb670 x15: 0000000000000001
x14: 1fffe000366cb4e2 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000040000 x10: 00000000000012ea x9 : 1c65b32bc44f3b00
x8 : 1c65b32bc44f3b00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80009e416558 x4 : ffff80008f8fd0c0 x3 : ffff80008062728c
x2 : 0000000000000001 x1 : 0000000100000001 x0 : 0000000000000000
Call trace:
 look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936 (P)
 look_up_lock_class+0xec/0x160 kernel/locking/lockdep.c:936 (L)
 register_lock_class+0x8c/0x6b4 kernel/locking/lockdep.c:1290
 __lock_acquire+0x18c/0x77c8 kernel/locking/lockdep.c:5077
 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5825
 local_lock_acquire+0x3c/0x98 include/linux/local_lock_internal.h:29
 ___slab_alloc+0xcd0/0xf4c mm/slub.c:3867
 __slab_alloc+0x74/0xd0 mm/slub.c:3908
 __slab_alloc_node mm/slub.c:3961 [inline]
 slab_alloc_node mm/slub.c:4122 [inline]
 kmem_cache_alloc_noprof+0x26c/0x354 mm/slub.c:4141
 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2863 [inline]
 xattr_alloc fs/f2fs/xattr.c:30 [inline]
 lookup_all_xattrs fs/f2fs/xattr.c:333 [inline]
 f2fs_getxattr+0x3b4/0x111c fs/f2fs/xattr.c:533
 f2fs_xattr_generic_get+0x130/0x174 fs/f2fs/xattr.c:63
 __vfs_getxattr+0x394/0x3c0 fs/xattr.c:423
 cap_inode_need_killpriv+0x50/0x78 security/commoncap.c:302
 security_inode_need_killpriv+0x90/0x298 security/security.c:2634
 dentry_needs_remove_privs fs/inode.c:2151 [inline]
 file_remove_privs_flags+0x1d0/0x4c0 fs/inode.c:2182
 file_modified_flags+0x58/0x250 fs/inode.c:2303
 file_modified+0x24/0x34 fs/inode.c:2332
 f2fs_write_checks fs/f2fs/file.c:4708 [inline]
 f2fs_file_write_iter+0x328/0x1ee4 fs/f2fs/file.c:4999
 new_sync_write fs/read_write.c:590 [inline]
 vfs_write+0x920/0xcf4 fs/read_write.c:683
 ksys_write+0x15c/0x26c fs/read_write.c:736
 __do_sys_write fs/read_write.c:748 [inline]
 __se_sys_write fs/read_write.c:745 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:745
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744
 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
irq event stamp: 80844
hardirqs last  enabled at (80843): [<ffff800080a0fa38>] seqcount_lockdep_reader_access+0x6c/0xd4 include/linux/seqlock.h:74
hardirqs last disabled at (80844): [<ffff800080a2c754>] ___slab_alloc+0xca4/0xf4c mm/slub.c:3867
softirqs last  enabled at (80834): [<ffff80008002f3d8>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (80832): [<ffff80008002f3a4>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ end trace 0000000000000000 ]---

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/09 22:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 563047e691f2 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in f2fs_getxattr
2024/11/05 13:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 46f782153ea2 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in f2fs_getxattr
2024/09/17 04:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in f2fs_getxattr
2024/09/17 04:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in f2fs_getxattr
* Struck through repros no longer work on HEAD.