capability: warning: `syz.2.144' uses 32-bit capabilities (legacy support in use) netlink: 4 bytes leftover after parsing attributes in process `syz.2.144'. BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:321 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 6497, name: syz.2.144 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 4 locks held by syz.2.144/6497: #0: ffff88802c97eb78 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x2a2/0x370 fs/file.c:1213 #1: ffff888040a38148 (&type->i_mutex_dir_key#11){++++}-{4:4}, at: iterate_dir+0x18b/0xb40 fs/readdir.c:101 #2: ffffffff8e3be900 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #2: ffffffff8e3be900 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #2: ffffffff8e3be900 (rcu_read_lock){....}-{1:3}, at: afs_dynroot_readdir+0x619/0xf50 fs/afs/dynroot.c:351 #3: ffff888029c80be0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_trylock include/linux/mmap_lock.h:209 [inline] #3: ffff888029c80be0 (&mm->mmap_lock){++++}-{4:4}, at: get_mmap_lock_carefully mm/memory.c:6242 [inline] #3: ffff888029c80be0 (&mm->mmap_lock){++++}-{4:4}, at: lock_mm_and_find_vma+0x35/0x6e0 mm/memory.c:6302 CPU: 0 UID: 0 PID: 6497 Comm: syz.2.144 Not tainted 6.14.0-syzkaller-10514-g7f2ff7b62617 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 __might_resched+0x3c0/0x5e0 kernel/sched/core.c:8818 might_alloc include/linux/sched/mm.h:321 [inline] prepare_alloc_pages.constprop.0+0x3da/0x570 mm/page_alloc.c:4513 __alloc_frozen_pages_noprof+0x18f/0x24d0 mm/page_alloc.c:4729 alloc_pages_mpol+0x1fb/0x540 mm/mempolicy.c:2301 folio_alloc_mpol_noprof+0x36/0x2f0 mm/mempolicy.c:2320 vma_alloc_folio_noprof+0xed/0x1e0 mm/mempolicy.c:2355 folio_prealloc mm/memory.c:1062 [inline] wp_page_copy mm/memory.c:3447 [inline] do_wp_page+0x201b/0x4820 mm/memory.c:3839 handle_pte_fault mm/memory.c:5909 [inline] __handle_mm_fault+0x1ae0/0x2a50 mm/memory.c:6036 handle_mm_fault+0x404/0xae0 mm/memory.c:6205 do_user_addr_fault+0x7a9/0x1430 arch/x86/mm/fault.c:1388 handle_page_fault arch/x86/mm/fault.c:1480 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1538 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:filldir+0x2b7/0x5f0 fs/readdir.c:292 Code: e8 5e 72 85 ff 0f 01 cb 0f ae e8 48 8b 04 24 49 89 47 08 e8 4b 72 85 ff 4c 8b 7c 24 30 48 8b 44 24 10 49 89 07 e8 39 72 85 ff <66> 45 89 6f 10 e8 2f 72 85 ff 49 63 f5 0f b6 7c 24 1c 48 89 34 24 RSP: 0018:ffffc90005527c68 EFLAGS: 00050283 RAX: 00000000000003c7 RBX: ffffc90005527e80 RCX: ffffc90007493000 RDX: 0000000000080000 RSI: ffffffff8235aad7 RDI: 0000000000000006 RBP: 0000200000002008 R08: 0000000000000006 R09: 0000200000001fd8 R10: 0000200000002008 R11: 0000000000000000 R12: 0000000000000004 R13: 0000000000000018 R14: ffff88804ebd0fe1 R15: 0000200000001ff0 dir_emit include/linux/fs.h:3861 [inline] afs_dynroot_readdir_cells fs/afs/dynroot.c:310 [inline] afs_dynroot_readdir+0x9bb/0xf50 fs/afs/dynroot.c:352 iterate_dir+0x293/0xb40 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:322 [inline] __se_sys_getdents fs/readdir.c:308 [inline] __x64_sys_getdents+0x14d/0x2c0 fs/readdir.c:308 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9bf158d169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9bf2408038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f9bf17a5fa0 RCX: 00007f9bf158d169 RDX: 00000000000000b8 RSI: 0000200000001fc0 RDI: 0000000000000009 RBP: 00007f9bf160e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f9bf17a5fa0 R15: 00007ffe6edc1c28 netlink: 28 bytes leftover after parsing attributes in process `syz.2.144'. netlink: 28 bytes leftover after parsing attributes in process `syz.2.144'. ---------------- Code disassembly (best guess): 0: e8 5e 72 85 ff call 0xff857263 5: 0f 01 cb stac 8: 0f ae e8 lfence b: 48 8b 04 24 mov (%rsp),%rax f: 49 89 47 08 mov %rax,0x8(%r15) 13: e8 4b 72 85 ff call 0xff857263 18: 4c 8b 7c 24 30 mov 0x30(%rsp),%r15 1d: 48 8b 44 24 10 mov 0x10(%rsp),%rax 22: 49 89 07 mov %rax,(%r15) 25: e8 39 72 85 ff call 0xff857263 * 2a: 66 45 89 6f 10 mov %r13w,0x10(%r15) <-- trapping instruction 2f: e8 2f 72 85 ff call 0xff857263 34: 49 63 f5 movslq %r13d,%rsi 37: 0f b6 7c 24 1c movzbl 0x1c(%rsp),%edi 3c: 48 89 34 24 mov %rsi,(%rsp)