BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 17393, name: syz-executor.4
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
4 locks held by syz-executor.4/17393:
#0: ffff88802b840460 (sb_writers#4){.+.+}-{0:0}, at: filename_create+0xf5/0x4a0 fs/namei.c:3877
#1: ffff88802e190e00 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:810 [inline]
#1: ffff88802e190e00 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: filename_create+0x1ae/0x4a0 fs/namei.c:3884
#2: ffff88802b844990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0xfb4/0x14e0 fs/jbd2/transaction.c:461
#3: ffffffff8c7991c0 (rcu_read_lock){....}-{1:2}, at: lru_gen_refault mm/workingset.c:293 [inline]
#3: ffffffff8c7991c0 (rcu_read_lock){....}-{1:2}, at: workingset_refault+0x175/0x11e0 mm/workingset.c:528
CPU: 1 PID: 17393 Comm: syz-executor.4 Not tainted 6.4.0-rc1-next-20230512-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
__might_resched+0x358/0x580 kernel/sched/core.c:10148
might_alloc include/linux/sched/mm.h:306 [inline]
slab_pre_alloc_hook mm/slab.h:670 [inline]
slab_alloc_node mm/slub.c:3433 [inline]
slab_alloc mm/slub.c:3459 [inline]
__kmem_cache_alloc_lru mm/slub.c:3466 [inline]
kmem_cache_alloc+0x357/0x3b0 mm/slub.c:3475
kmem_cache_zalloc include/linux/slab.h:670 [inline]
alloc_buffer_head+0x24/0x150 fs/buffer.c:3044
folio_alloc_buffers+0x2f2/0x810 fs/buffer.c:941
alloc_page_buffers fs/buffer.c:976 [inline]
grow_dev_page fs/buffer.c:1084 [inline]
grow_buffers fs/buffer.c:1130 [inline]
__getblk_slow+0x612/0x1230 fs/buffer.c:1157
__getblk_gfp+0x72/0x80 fs/buffer.c:1452
sb_getblk include/linux/buffer_head.h:369 [inline]
ext4_getblk+0x211/0x850 fs/ext4/inode.c:845
ext4_bread+0x2e/0x190 fs/ext4/inode.c:891
ext4_append+0x243/0x540 fs/ext4/namei.c:83
ext4_init_new_dir+0x262/0x4c0 fs/ext4/namei.c:2976
ext4_mkdir+0x3d3/0xb20 fs/ext4/namei.c:3022
vfs_mkdir+0x242/0x460 fs/namei.c:4115
do_mkdirat+0x28d/0x310 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x119/0x170 fs/namei.c:4151
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ffb2b08b187
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffb2bd7af88 EFLAGS: 00000213 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00000000000050ef RCX: 00007ffb2b08b187
RDX: 00000000000001ff RSI: 0000000020000000 RDI: 00000000ffffff9c
RBP: 0000000020005140 R08: 0000000000000000 R09: 00000000000050e9
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000020005100
R13: 0000000020000000 R14: 00007ffb2bd7afe0 R15: 0000000020000040
================================================
WARNING: lock held when returning to user space!
6.4.0-rc1-next-20230512-syzkaller #0 Tainted: G W
------------------------------------------------
syz-executor.4/17393 is leaving the kernel with locks still held!
1 lock held by syz-executor.4/17393:
#0: ffffffff8c7991c0 (rcu_read_lock){....}-{1:2}, at: lru_gen_refault mm/workingset.c:293 [inline]
#0: ffffffff8c7991c0 (rcu_read_lock){....}-{1:2}, at: workingset_refault+0x175/0x11e0 mm/workingset.c:528
------------[ cut here ]------------
Voluntary context switch within RCU read-side critical section!
WARNING: CPU: 0 PID: 17393 at kernel/rcu/tree_plugin.h:320 rcu_note_context_switch+0xbb9/0x1800 kernel/rcu/tree_plugin.h:320
Modules linked in:
CPU: 0 PID: 17393 Comm: syz-executor.4 Tainted: G W 6.4.0-rc1-next-20230512-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
RIP: 0010:rcu_note_context_switch+0xbb9/0x1800 kernel/rcu/tree_plugin.h:320
Code: fd 04 68 00 4c 8b 4c 24 30 8b 4c 24 28 48 8b 54 24 20 e9 8f 03 00 00 48 c7 c7 c0 2a 4e 8a c6 05 73 2b f6 0c 01 e8 17 b5 dc ff <0f> 0b e9 4c f5 ff ff 81 e5 ff ff ff 7f 0f 84 d7 f6 ff ff 65 48 8b
RSP: 0000:ffffc9000526fcd8 EFLAGS: 00010086
RAX: 0000000000000000 RBX: ffff8880b983d4c0 RCX: ffffc9000bb1c000
RDX: 0000000000040000 RSI: ffffffff814bc477 RDI: 0000000000000001
RBP: ffff888017673b80 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: fffffffffffdaef8 R12: 0000000000000000
R13: ffff888017673b80 R14: ffffffff8e7b28b0 R15: ffff8880b983c5c0
FS: 00007ffb2bd7b700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f98417ad988 CR3: 000000002a965000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__schedule+0x276/0x5790 kernel/sched/core.c:6569
schedule+0xde/0x1a0 kernel/sched/core.c:6745
exit_to_user_mode_loop kernel/entry/common.c:159 [inline]
exit_to_user_mode_prepare+0xc4/0x240 kernel/entry/common.c:204
irqentry_exit_to_user_mode+0x9/0x40 kernel/entry/common.c:310
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650
RIP: 0033:0x7ffb2b08b187
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffb2bd7af88 EFLAGS: 00000213
RAX: 0000000000000000 RBX: 00000000000050ef RCX: 00007ffb2b08b187
RDX: 00000000000001ff RSI: 0000000020000000 RDI: 00000000ffffff9c
RBP: 0000000020005140 R08: 0000000000000000 R09: 00000000000050e9
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000020005100
R13: 0000000020000000 R14: 00007ffb2bd7afe0 R15: 0000000020000040