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: 11d, last: 11d
Discussions (1)
Title Replies (including bot) Last reply
[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 94d 133d 0/28 auto-obsoleted due to no activity on 2024/09/04 12:08

Sample crash report:
F2FS-fs (loop1): invalid namelen(0), ino:0, run fsck to fix.
------------[ cut here ]------------
Looking for class "c->lock" with key init_kmem_cache_cpus.__key, but found a different class "&c->lock" with the same key
WARNING: CPU: 1 PID: 6409 at kernel/locking/lockdep.c:934 look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:931
Modules linked in:
CPU: 1 UID: 0 PID: 6409 Comm: syz-executor Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:931
lr : look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:931
sp : ffff80009d476c80
x29: ffff80009d476c80 x28: dfff800000000000 x27: 0000000000000000
x26: ffff800097041700 x25: ffff800097041000 x24: 0000000000000001
x23: 0000000000000000 x22: 1ffff00011eae0b1 x21: ffff8000970a13b0
x20: fffffdffbf769c10 x19: ffff800092b14580 x18: 0000000000000008
x17: 2c79656b5f5f2e73 x16: ffff800083032784 x15: 0000000000000001
x14: 1fffe000366d7a5a x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000003 x10: 0000000000ff0100 x9 : b8f830333a1c6900
x8 : b8f830333a1c6900 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80009d4763d8 x4 : ffff80008f65b620 x3 : ffff8000806051a0
x2 : 0000000000000001 x1 : 0000000100000001 x0 : 0000000000000000
Call trace:
 look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:931
 register_lock_class+0x8c/0x6ac kernel/locking/lockdep.c:1283
 __lock_acquire+0x18c/0x779c kernel/locking/lockdep.c:5019
 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5759
 local_lock_acquire+0x3c/0x98 include/linux/local_lock_internal.h:29
 ___slab_alloc+0xcbc/0xf38 mm/slub.c:3776
 __slab_alloc+0x74/0xd0 mm/slub.c:3817
 __slab_alloc_node mm/slub.c:3870 [inline]
 slab_alloc_node mm/slub.c:4029 [inline]
 kmem_cache_alloc_noprof+0x26c/0x350 mm/slub.c:4048
 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2835 [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
 smk_fetch+0xc8/0x150 security/smack/smack_lsm.c:306
 smack_d_instantiate+0x594/0x880 security/smack/smack_lsm.c:3613
 security_d_instantiate+0x98/0xf0 security/security.c:3942
 d_splice_alias+0x70/0x310 fs/dcache.c:2987
 f2fs_lookup+0x270/0xaf4 fs/f2fs/namei.c:591
 __lookup_slow+0x250/0x374 fs/namei.c:1718
 lookup_slow+0x60/0x84 fs/namei.c:1735
 walk_component+0x280/0x36c fs/namei.c:2039
 lookup_last fs/namei.c:2542 [inline]
 path_lookupat+0x13c/0x3d0 fs/namei.c:2566
 filename_lookup+0x1d4/0x4e0 fs/namei.c:2595
 user_path_at+0x50/0x74 fs/namei.c:3002
 ksys_umount fs/namespace.c:2033 [inline]
 __do_sys_umount fs/namespace.c:2041 [inline]
 __se_sys_umount fs/namespace.c:2039 [inline]
 __arm64_sys_umount+0xf4/0x178 fs/namespace.c:2039
 __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:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598
irq event stamp: 261568
hardirqs last  enabled at (261567): [<ffff8000809d8e84>] seqcount_lockdep_reader_access+0x6c/0xd4 include/linux/seqlock.h:74
hardirqs last disabled at (261568): [<ffff8000809ef7cc>] ___slab_alloc+0xc90/0xf38 mm/slub.c:3776
softirqs last  enabled at (261538): [<ffff8000800307f8>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (261536): [<ffff8000800307c4>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ end trace 0000000000000000 ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.