Kernel bug: INFO: rcu detected stall in shmem_file_write_iter (3)
Subsystem: mm
Status: open

Crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-0): P5973/1:b..l
rcu: 	(detected by 0, t=10502 jiffies, g=33977, q=94 ncpus=1)
task:syz.5.221       state:R  running task     stack:25112 pid:5973  tgid:5973  ppid:5485   task_flags:0x400040 flags:0x00080000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5260 [inline]
 __schedule+0x14ea/0x5050 kernel/sched/core.c:6867
 preempt_schedule_irq+0x4d/0xa0 kernel/sched/core.c:7194
 irqentry_exit+0x597/0x620 kernel/entry/common.c:216
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__rcu_read_lock+0x31/0x60 kernel/rcu/tree_plugin.h:416
Code: 8b 1d bb 01 49 11 48 81 c3 84 04 00 00 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 0f b6 04 08 84 c0 75 18 ff 03 8b 03 <3d> 00 00 00 40 7d 07 5b c3 cc cc cc cc cc 90 0f 0b 90 eb f3 89 d9
RSP: 0018:ffffc90003b170c8 EFLAGS: 00000202
RAX: 0000000000000001 RBX: ffff8880526f8484 RCX: dffffc0000000000
RDX: dffffc0000000000 RSI: ffffffff8200ea42 RDI: ffffc90003b171a8
RBP: dffffc0000000000 R08: ffffc90003b17270 R09: 0000000000000008
R10: ffffc90003b171f8 R11: ffffffff81afb170 R12: 1ffff92000762e35
R13: ffffc90003b171e0 R14: ffffc90003b171a8 R15: ffffc90003b17b20
 rcu_read_lock include/linux/rcupdate.h:865 [inline]
 class_rcu_constructor include/linux/rcupdate.h:1195 [inline]
 unwind_next_frame+0x9e/0x23c0 arch/x86/kernel/unwind_orc.c:495
 arch_stack_walk+0x11b/0x150 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0xa9/0x100 kernel/stacktrace.c:122
 save_stack+0x122/0x230 mm/page_owner.c:165
 __set_page_owner+0x8d/0x4c0 mm/page_owner.c:341
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884
 prep_new_page mm/page_alloc.c:1892 [inline]
 get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3945
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
 folio_alloc_mpol_noprof+0x39/0x70 mm/mempolicy.c:2505
 shmem_alloc_folio mm/shmem.c:1913 [inline]
 shmem_alloc_and_add_folio+0x445/0xf80 mm/shmem.c:1955
 shmem_get_folio_gfp+0x5a9/0x1670 mm/shmem.c:2579
 shmem_get_folio mm/shmem.c:2685 [inline]
 shmem_write_begin+0x16c/0x330 mm/shmem.c:3338
 generic_perform_write+0x2e2/0x8f0 mm/filemap.c:4314
 shmem_file_write_iter+0xf8/0x120 mm/shmem.c:3513
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x61d/0xb90 fs/read_write.c:686
 ksys_write+0x150/0x270 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1ef735b78e
RSP: 002b:00007ffc44ca3b98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000055558e4b7500 RCX: 00007f1ef735b78e
RDX: 0000000001000000 RSI: 00007f1eee400000 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffc44ca3cd0 R14: 00007ffc44ca3c90 R15: 00007f1eee400000
 </TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10497 jiffies! g33977 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: 	Possible timer handling issue on cpu=0 timer-softirq=24428
rcu: rcu_preempt kthread starved for 10498 jiffies! g33977 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0
rcu: 	Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt     state:I stack:28784 pid:16    tgid:16    ppid:2      task_flags:0x208040 flags:0x00080000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5260 [inline]
 __schedule+0x14ea/0x5050 kernel/sched/core.c:6867
 __schedule_loop kernel/sched/core.c:6949 [inline]
 schedule+0x164/0x360 kernel/sched/core.c:6964
 schedule_timeout+0x158/0x2c0 kernel/time/sleep_timeout.c:99
 rcu_gp_fqs_loop+0x312/0x1560 kernel/rcu/tree.c:2083
 rcu_gp_kthread+0x9d/0x3b0 kernel/rcu/tree.c:2285
 kthread+0x726/0x8b0 kernel/kthread.c:463
 ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 0 UID: 0 PID: 1314 Comm: aoe_tx0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:194
Code: f7 e8 dd 47 05 f6 f7 c3 00 02 00 00 74 05 e8 80 b5 30 f6 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> 64 13 f7 f5 65 8b 05 cd b5 57 07 85 c0 74 18 5b 41 5e c3 cc cc
RSP: 0018:ffffc9000858f788 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000286 RCX: 0000000000000202
RDX: 0000000000000002 RSI: ffffffff8dccfc9a RDI: 0000000000000001
RBP: dffffc0000000000 R08: ffffffff8fef3f77 R09: 1ffffffff1fde7ee
R10: dffffc0000000000 R11: fffffbfff1fde7ef R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff9a3421a0 R15: ffffffff8edf0cc0
FS:  0000000000000000(0000) GS:ffff88808ccea000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6c1dbf8000 CR3: 000000005495c000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
 uart_port_unlock_irqrestore include/linux/serial_core.h:788 [inline]
 uart_port_unlock_deref drivers/tty/serial/serial_core.c:91 [inline]
 uart_write_room+0x3b0/0x840 drivers/tty/serial/serial_core.c:647
 handle_tx+0x163/0x610 drivers/net/caif/caif_serial.c:212
 __netdev_start_xmit include/linux/netdevice.h:5273 [inline]
 netdev_start_xmit include/linux/netdevice.h:5282 [inline]
 xmit_one net/core/dev.c:3866 [inline]
 dev_hard_start_xmit+0x2cd/0x7f0 net/core/dev.c:3882
 __dev_queue_xmit+0x168f/0x3850 net/core/dev.c:4832
 dev_queue_xmit include/linux/netdevice.h:3381 [inline]
 tx+0x6b/0x190 drivers/block/aoe/aoenet.c:62
 kthread+0x1e0/0x3f0 drivers/block/aoe/aoecmd.c:1241
 kthread+0x726/0x8b0 kernel/kthread.c:463
 ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
 </TASK>