__sys_setsockopt+0x77/0xc0 net/socket.c:2334 __do_sys_setsockopt net/socket.c:2343 [inline] __se_sys_setsockopt net/socket.c:2340 [inline] __x64_sys_setsockopt+0x1a/0x20 net/socket.c:2340 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0xe0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b page last free pid 21 tgid 21 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1133 [inline] free_unref_page_prepare+0x213/0x3f0 mm/page_alloc.c:2340 free_unref_page+0x33/0x170 mm/page_alloc.c:2480 __unfreeze_partials+0x202/0x220 mm/slub.c:2666 do_slab_free mm/slub.c:3768 [inline] slab_free mm/slub.c:3821 [inline] kmem_cache_free+0x489/0x4d0 mm/slub.c:3842 put_task_struct include/linux/sched/task.h:136 [inline] put_task_struct include/linux/sched/task.h:123 [inline] delayed_put_task_struct+0xde/0x130 kernel/exit.c:227 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x434/0x790 kernel/rcu/tree.c:2431 __do_softirq+0xa0/0x38c kernel/softirq.c:553 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1861 at include/linux/rmap.h:208 __folio_rmap_sanity_checks include/linux/rmap.h:208 [inline] WARNING: CPU: 1 PID: 1861 at include/linux/rmap.h:208 __folio_add_file_rmap mm/rmap.c:1389 [inline] WARNING: CPU: 1 PID: 1861 at include/linux/rmap.h:208 folio_add_file_rmap_ptes+0x63/0x270 mm/rmap.c:1447 Modules linked in: CPU: 1 PID: 1861 Comm: syz-executor.0 Not tainted 6.7.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 RIP: 0010:__folio_rmap_sanity_checks include/linux/rmap.h:208 [inline] RIP: 0010:__folio_add_file_rmap mm/rmap.c:1389 [inline] RIP: 0010:folio_add_file_rmap_ptes+0x63/0x270 mm/rmap.c:1447 Code: 00 a8 40 0f 85 8a 01 00 00 31 f6 48 89 ef e8 c4 e2 ff ff 48 8b 00 a8 40 74 13 48 c7 c6 58 7d 15 82 48 89 ef e8 4e 88 fd ff 90 <0f> 0b 90 45 85 f6 0f 8e c7 01 00 00 48 8b 43 08 a8 01 0f 85 cb 01 RSP: 0018:ffffc900018d7c60 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffea000413c400 RCX: ffffc900018d7bf4 RDX: 0000000000000004 RSI: ffffffff820e5732 RDI: ffffffff8210109a RBP: ffffea000413c400 R08: 0000000000000000 R09: ffffffff824961a0 R10: ffffc900018d7ac8 R11: ffffffff825761e8 R12: ffff88810fef5888 R13: ffffea000413c45c R14: 0000000000000001 R15: ffff888100065d80 FS: 00007f835cc2b6c0(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200000c0 CR3: 000000010d6ef000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: insert_page_into_pte_locked.isra.0+0xd7/0x2c0 mm/memory.c:1867 insert_page mm/memory.c:1893 [inline] vm_insert_page+0x158/0x290 mm/memory.c:2046 packet_mmap+0x123/0x1f0 net/packet/af_packet.c:4600 call_mmap include/linux/fs.h:2025 [inline] mmap_region+0x263/0xb80 mm/mmap.c:2816 do_mmap+0x355/0x510 mm/mmap.c:1379 vm_mmap_pgoff+0xe3/0x200 mm/util.c:556 ksys_mmap_pgoff+0x193/0x200 mm/mmap.c:1425 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0xe0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f835d0a8ce9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f835cc2b0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f835d1c7f80 RCX: 00007f835d0a8ce9 RDX: 0000000000000000 RSI: 0000000001000000 RDI: 0000000020568000 RBP: 00007f835d0f547a R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f835d1c7f80 R15: 00007fff37f11bd8