mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [syzbot] [gfs2?] INFO: trying to register non-static key in gfs2_release_folio
@ 2026-11-30 21:57 syzbot
  0 siblings, 0 replies; only message in thread
From: syzbot @ 2026-11-30 21:57 UTC (permalink / raw)
  To: agruenba, gfs2, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    e5aad2bdbbee Add linux-next specific files for 20261127
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=152dffed580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=235638d4599b6687
dashboard link: https://syzkaller.appspot.com/bug?extid=fdf698d264f79d100307
compiler:       Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6bdcd1f8d9f8/disk-e5aad2bd.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/515f8db93468/vmlinux-e5aad2bd.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7953d2395d69/bzImage-e5aad2bd.xz

The issue was bisected by AI to:

commit b886e0e5de6e7b15ddb302d824ba6a6bb3622c5b
Author: Andreas Gruenbacher <agruenba@redhat.com>
Date:   Thu Nov 12 18:58:36 2026 +0000

    gfs2: keep glocks alive while they have active buffers

reasoning:      https://syzkaller.appspot.com/ai_job?id=be745086-4b45-4a9d-a980-22ed4dc1b6f8

AI-generated root cause summary:
In gfs2_fill_super() (fs/gfs2/ops_fstype.c), the mount-failure error path frees
the superblock private structure via free_sbd(sdp) without waiting for glock
disposal (gfs2_wait_glocks(sdp)), flushing deferred delete work
(gfs2_flush_delete_work(sdp)), or calling rcu_barrier(), and calls
gfs2_lm_unmount(sdp) before destroying sdp->sd_glock_wq. Consequently,
GLOF_ASPACE glocks (struct gfs2_glock_aspace, whose embedded mapping uses
gfs2_meta_aops) can outlive free_sbd(sdp) with cached metadata folios still on
the LRU and a dangling gla->glock.gl_name.ln_sbd pointer. When memory reclaim
later invokes shrink_folio_list() -> filemap_release_folio() ->
gfs2_release_folio(), gfs2_mapping2sbd(folio->mapping) returns the freed and
reallocated sdp pointer, and spin_lock(&sdp->sd_log_lock) operates on arbitrary
reallocated heap memory, triggering the Lockdep non-static key error and the
UBSAN out-of-bounds tail-CPU index in decode_tail().

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=fdf698d264f79d100307

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fdf698d264f79d100307@syzkaller.appspotmail.com

The bisection result may be wrong.
If you agree with it, please also add:
Fixes: b886e0e5de6e ("gfs2: keep glocks alive while they have active buffers")

INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 UID: 0 PID: 28098 Comm: syz.6.4686 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 assign_lock_key+0x133/0x150 kernel/locking/lockdep.c:1028
 register_lock_class+0xcc/0x2e0 kernel/locking/lockdep.c:1343
 __lock_acquire+0x10c/0x2de0 kernel/locking/lockdep.c:5162
 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
 __raw_spin_lock include/linux/spinlock_api_smp.h:190 [inline]
 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:173
 spin_lock include/linux/spinlock.h:347 [inline]
 gfs2_release_folio+0x10c/0x570 fs/gfs2/aops.c:671
 shrink_folio_list+0x2361/0x5110 mm/vmscan.c:1456
 evict_folios mm/vmscan.c:5024 [inline]
 evict_folio_lists+0x2bf4/0x3e80 mm/vmscan.c:5199
 try_to_shrink_lruvec+0x186e/0x2ac0 mm/vmscan.c:5254
 lru_gen_shrink_lruvec mm/vmscan.c:5423 [inline]
 shrink_lruvec mm/vmscan.c:6201 [inline]
 shrink_node_memcgs mm/vmscan.c:6450 [inline]
 shrink_node+0xe26/0x6ae0 mm/vmscan.c:6494
 shrink_zones mm/vmscan.c:6712 [inline]
 do_try_to_free_pages+0x50e/0x1880 mm/vmscan.c:6774
 try_to_free_mem_cgroup_pages+0x2f2/0x7f0 mm/vmscan.c:7057
 mem_cgroup_resize_max+0x23c/0x510 mm/memcontrol-v1.c:1466
 mem_cgroup_write+0x1a6/0x230 mm/memcontrol-v1.c:-1
 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4427
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:580 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:672
 ksys_write+0x150/0x270 fs/read_write.c:724
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x00007fb0c67a9b59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb0c7739028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fb0c6a35fa0 RCX: 00007fb0c67a9b59
RDX: 0000000000000020 RSI: 0000200000000480 RDI: 0000000000000004
RBP: 00007fb0c683a18b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb0c6a36038 R14: 00007fb0c6a35fa0 R15: 00007ffcead31648
 </TASK>
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.h:68:9
index 2460 is out of range for type 'unsigned long[8]'
CPU: 0 UID: 0 PID: 28098 Comm: syz.6.4686 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
 __ubsan_handle_out_of_bounds+0xe8/0xf0 lib/ubsan.c:455
 decode_tail kernel/locking/qspinlock.h:68 [inline]
 __pv_queued_spin_lock_slowpath+0xaf3/0xbc0 kernel/locking/qspinlock.c:307
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt-spinlock.h:37 [inline]
 queued_spin_lock_slowpath arch/x86/include/asm/paravirt-spinlock.h:71 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:115 [inline]
 do_raw_spin_lock+0x26c/0x2f0 kernel/locking/spinlock_debug.c:116
 spin_lock include/linux/spinlock.h:347 [inline]
 gfs2_release_folio+0x10c/0x570 fs/gfs2/aops.c:671
 shrink_folio_list+0x2361/0x5110 mm/vmscan.c:1456
 evict_folios mm/vmscan.c:5024 [inline]
 evict_folio_lists+0x2bf4/0x3e80 mm/vmscan.c:5199
 try_to_shrink_lruvec+0x186e/0x2ac0 mm/vmscan.c:5254
 lru_gen_shrink_lruvec mm/vmscan.c:5423 [inline]
 shrink_lruvec mm/vmscan.c:6201 [inline]
 shrink_node_memcgs mm/vmscan.c:6450 [inline]
 shrink_node+0xe26/0x6ae0 mm/vmscan.c:6494
 shrink_zones mm/vmscan.c:6712 [inline]
 do_try_to_free_pages+0x50e/0x1880 mm/vmscan.c:6774
 try_to_free_mem_cgroup_pages+0x2f2/0x7f0 mm/vmscan.c:7057
 mem_cgroup_resize_max+0x23c/0x510 mm/memcontrol-v1.c:1466
 mem_cgroup_write+0x1a6/0x230 mm/memcontrol-v1.c:-1
 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4427
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:580 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:672
 ksys_write+0x150/0x270 fs/read_write.c:724
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x00007fb0c67a9b59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb0c7739028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fb0c6a35fa0 RCX: 00007fb0c67a9b59
RDX: 0000000000000020 RSI: 0000200000000480 RDI: 0000000000000004
RBP: 00007fb0c683a18b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb0c6a36038 R14: 00007fb0c6a35fa0 R15: 00007ffcead31648
 </TASK>
---[ end trace ]---


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 21:57 [syzbot] [gfs2?] INFO: trying to register non-static key in gfs2_release_folio syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®