BTRFS info (device loop3): last unmount of filesystem c9fe44da-de57-406a-8241-57ec7d4412cf BUG: spinlock bad magic on CPU#2, syz-executor.3/7966 ================================================================== BUG: KASAN: slab-out-of-bounds in task_pid_nr include/linux/pid.h:232 [inline] BUG: KASAN: slab-out-of-bounds in spin_dump kernel/locking/spinlock_debug.c:64 [inline] BUG: KASAN: slab-out-of-bounds in spin_bug+0x17d/0x1d0 kernel/locking/spinlock_debug.c:78 Read of size 4 at addr ffff8880121055d8 by task syz-executor.3/7966 CPU: 2 PID: 7966 Comm: syz-executor.3 Not tainted 6.9.0-syzkaller-08995-g0450d2083be6 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 task_pid_nr include/linux/pid.h:232 [inline] spin_dump kernel/locking/spinlock_debug.c:64 [inline] spin_bug+0x17d/0x1d0 kernel/locking/spinlock_debug.c:78 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x225/0x2c0 kernel/locking/spinlock_debug.c:115 put_pwq_unlocked kernel/workqueue.c:1662 [inline] put_pwq_unlocked kernel/workqueue.c:1655 [inline] destroy_workqueue+0x5df/0xaa0 kernel/workqueue.c:5851 btrfs_stop_all_workers+0xcf/0x370 fs/btrfs/disk-io.c:1792 close_ctree+0x4e3/0xf90 fs/btrfs/disk-io.c:4365 generic_shutdown_super+0x159/0x3d0 fs/super.c:641 kill_anon_super+0x3a/0x60 fs/super.c:1225 btrfs_kill_super+0x3b/0x50 fs/btrfs/super.c:2088 deactivate_locked_super+0xbe/0x1a0 fs/super.c:472 deactivate_super+0xde/0x100 fs/super.c:505 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14e/0x250 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x278/0x2a0 kernel/entry/common.c:218 __do_fast_syscall_32+0x82/0x120 arch/x86/entry/common.c:389 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf72d2579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000ffed82c8 EFLAGS: 00000292 ORIG_RAX: 0000000000000034 RAX: 0000000000000000 RBX: 00000000ffed8370 RCX: 0000000000000009 RDX: 00000000f7428ff4 RSI: 00000000f7379361 RDI: 00000000ffed9414 RBP: 00000000ffed8370 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8780: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4039 [inline] __kmalloc+0x1f9/0x440 mm/slub.c:4052 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] alloc_workqueue+0xdfb/0x1c90 kernel/workqueue.c:5667 btrfs_init_workqueues fs/btrfs/disk-io.c:2004 [inline] open_ctree+0x1503/0x52e0 fs/btrfs/disk-io.c:3362 btrfs_fill_super fs/btrfs/super.c:938 [inline] btrfs_get_tree_super fs/btrfs/super.c:1855 [inline] btrfs_get_tree+0x11e9/0x1b90 fs/btrfs/super.c:2081 vfs_get_tree+0x8f/0x380 fs/super.c:1779 fc_mount+0x16/0xc0 fs/namespace.c:1125 btrfs_get_tree_subvol fs/btrfs/super.c:2044 [inline] btrfs_get_tree+0xa53/0x1b90 fs/btrfs/super.c:2082 vfs_get_tree+0x8f/0x380 fs/super.c:1779 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x6e1/0x1f10 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __ia32_sys_mount+0x295/0x320 fs/namespace.c:3875 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888012105000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 960 bytes to the right of allocated 536-byte region [ffff888012105000, ffff888012105218) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888012100000 pfn:0x12100 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000a40(workingset|slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000a40 ffff888015442dc0 ffffea0000731810 ffffea0000771e10 raw: ffff888012100000 000000000010000a 00000001ffffffff 0000000000000000 head: 00fff00000000a40 ffff888015442dc0 ffffea0000731810 ffffea0000771e10 head: ffff888012100000 000000000010000a 00000001ffffffff 0000000000000000 head: 00fff00000000003 ffffea0000484001 dead000000000122 00000000ffffffff head: 0000000800000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5193, tgid 5193 (sshd), ts 140453665199, free_ts 140440978933 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317 __alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2353 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2406 ___slab_alloc+0xd28/0x1810 mm/slub.c:3592 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3682 __slab_alloc_node mm/slub.c:3735 [inline] slab_alloc_node mm/slub.c:3908 [inline] __do_kmalloc_node mm/slub.c:4038 [inline] __kmalloc+0x3bf/0x440 mm/slub.c:4052 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] ieee802_11_parse_elems_full+0xef/0x15b0 net/mac80211/parse.c:880 ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2330 [inline] ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2337 [inline] ieee80211_inform_bss+0xf1/0x10f0 net/mac80211/scan.c:79 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline] cfg80211_inform_single_bss_data+0x88f/0x2240 net/wireless/scan.c:2277 cfg80211_inform_bss_data+0x254/0x3b50 net/wireless/scan.c:3101 cfg80211_inform_bss_frame_data+0x253/0x8b0 net/wireless/scan.c:3191 ieee80211_bss_info_update+0x311/0xab0 net/mac80211/scan.c:226 ieee80211_scan_rx+0x47c/0xad0 net/mac80211/scan.c:340 __ieee80211_rx_handle_packet net/mac80211/rx.c:5222 [inline] ieee80211_rx_list+0x1bb6/0x2ec0 net/mac80211/rx.c:5459 ieee80211_rx_napi+0xdd/0x400 net/mac80211/rx.c:5482 page last free pid 7964 tgid 7964 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2347 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2487 __put_partials+0x14c/0x170 mm/slub.c:2920 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3871 [inline] slab_alloc_node mm/slub.c:3918 [inline] kmem_cache_alloc+0x136/0x330 mm/slub.c:3925 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags+0x9b/0xf0 include/linux/audit.h:322 user_path_at_empty+0x2c/0x60 fs/namei.c:2928 user_path_at include/linux/namei.h:58 [inline] do_utimes_path+0xf4/0x1c0 fs/utimes.c:95 do_utimes+0x34/0x100 fs/utimes.c:145 __do_sys_utimensat fs/utimes.c:164 [inline] __se_sys_utimensat fs/utimes.c:148 [inline] __x64_sys_utimensat+0x1c7/0x290 fs/utimes.c:148 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888012105480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888012105500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888012105580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888012105600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888012105680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi