BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 10586, name: syz-executor.1 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz-executor.1/10586: #0: ffff888022f75300 (&iint_mutex_key[depth]){+.+.}-{3:3}, at: process_measurement+0x896/0x2260 security/integrity/ima/ima_main.c:267 #1: ffff888044284d18 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:857 [inline] #1: ffff888044284d18 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: page_cache_ra_unbounded+0x13a/0x5f0 mm/readahead.c:225 #2: ffffffff8d3ced18 (pointers_lock){.+.+}-{2:2}, at: get_block+0x18f/0x15c0 fs/sysv/itree.c:221 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 2 PID: 10586 Comm: syz-executor.1 Not tainted 6.7.0-rc7-syzkaller-00016-gf5837722ffec #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+0x125/0x1b0 lib/dump_stack.c:106 __might_resched+0x3c3/0x5e0 kernel/sched/core.c:10151 might_alloc include/linux/sched/mm.h:306 [inline] bdev_getblk+0x89/0xc0 fs/buffer.c:1425 __bread_gfp+0xa9/0x370 fs/buffer.c:1474 sb_bread include/linux/buffer_head.h:324 [inline] get_branch+0x2cb/0x660 fs/sysv/itree.c:104 get_block+0x1ad/0x15c0 fs/sysv/itree.c:222 block_read_full_folio+0x3df/0xaa0 fs/buffer.c:2399 read_pages+0xa76/0xdc0 mm/readahead.c:180 page_cache_ra_unbounded+0x457/0x5f0 mm/readahead.c:269 do_page_cache_ra mm/readahead.c:299 [inline] page_cache_ra_order+0x72b/0xa80 mm/readahead.c:546 ondemand_readahead+0x493/0x1130 mm/readahead.c:668 page_cache_sync_ra+0x174/0x1d0 mm/readahead.c:695 page_cache_sync_readahead include/linux/pagemap.h:1283 [inline] filemap_get_pages+0xc06/0x1830 mm/filemap.c:2497 filemap_read+0x39b/0xcf0 mm/filemap.c:2593 generic_file_read_iter+0x346/0x450 mm/filemap.c:2781 __kernel_read+0x301/0x870 fs/read_write.c:428 integrity_kernel_read+0x7f/0xb0 security/integrity/iint.c:221 ima_calc_file_hash_tfm+0x2c5/0x3d0 security/integrity/ima/ima_crypto.c:485 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0x1c6/0x4a0 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x85e/0xa20 security/integrity/ima/ima_api.c:290 process_measurement+0xe92/0x2260 security/integrity/ima/ima_main.c:359 ima_file_check+0xc2/0x110 security/integrity/ima/ima_main.c:557 do_open fs/namei.c:3624 [inline] path_openat+0x1821/0x2c50 fs/namei.c:3779 do_filp_open+0x1de/0x430 fs/namei.c:3809 do_sys_openat2+0x176/0x1e0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_compat_sys_open fs/open.c:1503 [inline] __se_compat_sys_open fs/open.c:1501 [inline] __ia32_compat_sys_open+0x147/0x1d0 fs/open.c:1501 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x62/0xe0 arch/x86/entry/common.c:321 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:346 entry_SYSENTER_compat_after_hwframe+0x70/0x7a RIP: 0023:0xf7f3c579 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:00000000f7f165ac EFLAGS: 00000292 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 00000000200001c0 RCX: 0000000000020182 RDX: 0000000000000028 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- 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