last executing test programs: kernel console output (not intermixed with test programs): Warning: Permanently added '[localhost]:54797' (ED25519) to the list of known hosts. syzkaller login: [ 892.496432][ T3214] cgroup: Unknown subsys name 'net' [ 893.796789][ T3214] cgroup: Unknown subsys name 'cpuset' [ 894.028820][ T3214] cgroup: Unknown subsys name 'rlimit' [ 894.101343][ T3023] BUG: sleeping function called from invalid context at mm/shmem.c:230 [ 894.137771][ T3023] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 3023, name: syslogd [ 894.141802][ T3023] preempt_count: 0, expected: 0 [ 894.143971][ T3023] RCU nest depth: 2, expected: 0 [ 894.161530][ T3023] 4 locks held by syslogd/3023: [ 894.164055][ T3023] #0: ffffaf801c0dc410 (sb_writers#5){.+.+}-{0:0}, at: vfs_write+0x8a0/0xc78 [ 894.189258][ T3023] #1: ffffaf801cacb280 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: shmem_file_write_iter+0x78/0x138 [ 894.207371][ T3023] #2: ffffffff887f4120 (rcu_read_lock){....}-{1:3}, at: lruvec_stat_mod_folio+0x5a/0x25c [ 894.221853][ T3023] #3: ffffffff887f4120 (rcu_read_lock){....}-{1:3}, at: lruvec_stat_mod_folio+0x5a/0x25c [ 894.230962][ T3023] CPU: 1 UID: 0 PID: 3023 Comm: syslogd Tainted: G W syzkaller #0 PREEMPT [ 894.231898][ T3023] Tainted: [W]=WARN [ 894.232096][ T3023] Hardware name: riscv-virtio,qemu (DT) [ 894.232295][ T3023] Call Trace: [ 894.232486][ T3023] [] dump_backtrace+0x2e/0x3c [ 894.233014][ T3023] [] show_stack+0x30/0x3c [ 894.233451][ T3023] [] dump_stack_lvl+0x114/0x1ac [ 894.234234][ T3023] [] dump_stack+0x1c/0x28 [ 894.235026][ T3023] [] __might_resched+0x556/0x5b4 [ 894.235653][ T3023] [] __might_sleep+0x80/0xc4 [ 894.236150][ T3023] [] shmem_inode_acct_blocks+0xaa/0x410 [ 894.236700][ T3023] [] shmem_alloc_and_add_folio+0x544/0x1a1c [ 894.237176][ T3023] [] shmem_get_folio_gfp+0x5ea/0x173c [ 894.237644][ T3023] [] shmem_write_begin+0x17e/0x360 [ 894.238205][ T3023] [] generic_perform_write+0x23e/0x944 [ 894.238783][ T3023] [] shmem_file_write_iter+0x110/0x138 [ 894.239232][ T3023] [] vfs_write+0x648/0xc78 [ 894.239621][ T3023] [] ksys_write+0x126/0x238 [ 894.239976][ T3023] [] __riscv_sys_write+0x6e/0x94 [ 894.240415][ T3023] [] syscall_handler+0x92/0x114 [ 894.240911][ T3023] [] do_trap_ecall_u+0x3dc/0x61c [ 894.241497][ T3023] [] handle_exception+0x15e/0x16a [ 894.263166][ T3023] [ 894.264134][ T3023] ================================================ [ 894.266130][ T3023] WARNING: lock held when returning to user space! [ 894.268583][ T3023] syzkaller #0 Tainted: G W [ 894.269840][ T3023] ------------------------------------------------ [ 894.270785][ T3023] syslogd/3023 is leaving the kernel with locks still held! [ 894.272903][ T3023] 2 locks held by syslogd/3023: [ 894.274291][ T3023] #0: ffffffff887f4120 (rcu_read_lock){....}-{1:3}, at: lruvec_stat_mod_folio+0x5a/0x25c [ 894.278146][ T3023] #1: ffffffff887f4120 (rcu_read_lock){....}-{1:3}, at: lruvec_stat_mod_folio+0x5a/0x25c [ 894.284098][ T3023] ------------[ cut here ]------------ [ 894.285474][ T3023] Voluntary context switch within RCU read-side critical section! [ 894.287356][ C1] WARNING: [] kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0xf7c/0x1a90, CPU#1: syslogd/3023 [ 894.288559][ C1] Modules linked in: [ 894.289020][ C1] CPU: 1 UID: 0 PID: 3023 Comm: syslogd Tainted: G W syzkaller #0 PREEMPT [ 894.289843][ C1] Tainted: [W]=WARN [ 894.290056][ C1] Hardware name: riscv-virtio,qemu (DT) [ 894.290320][ C1] epc : rcu_note_context_switch+0xf7c/0x1a90 [ 894.291060][ C1] ra : rcu_note_context_switch+0xf7c/0x1a90 [ 894.291787][ C1] epc : ffffffff803a7888 ra : ffffffff803a7888 sp : ffff8f8003d47b30 [ 894.292208][ C1] gp : ffffffff8a24a9a0 tp : ffffaf801ba03580 t0 : ffff8f8003d476f4 [ 894.292633][ C1] t1 : fffffffef1449e50 t2 : 2d2d2d2d2d2d2d2d s0 : ffff8f8003d47c20 [ 894.293040][ C1] s1 : ffffaf8072c9f780 a0 : 0000000000000005 a1 : 0000000000000000 [ 894.293441][ C1] a2 : 0000000000000002 a3 : ffffffff8014e99c a4 : 0000000000000000 [ 894.293860][ C1] a5 : 0000000000000000 a6 : 0000000000000003 a7 : 0000000000000003 [ 894.294232][ C1] s2 : 0000000000000000 s3 : ffffaf801ba03580 s4 : ffffffff8a1eabe0 [ 894.294638][ C1] s5 : ffffaf801ba03580 s6 : ffff8f8003d47d20 s7 : ffffffff8687e880 [ 894.295043][ C1] s8 : ffffffff8a28fb00 s9 : 000000000000006b s10: ffffffff91623ec0 [ 894.295486][ C1] s11: 0000000000000001 t3 : ffffffff88073db8 t4 : fffffffef1449e50 [ 894.295877][ C1] t5 : fffffffef1449e51 t6 : ffff8f8003d474b8 ssp : 0000000000000000 [ 894.296278][ C1] status: 0000000200000100 badaddr: ffffffff803a7888 cause: 0000000000000003 [ 894.296686][ C1] [] rcu_note_context_switch+0xf7c/0x1a90 [ 894.297650][ C1] [] __schedule+0x2b2/0x4dec [ 894.298335][ C1] [] schedule+0xb4/0x334 [ 894.298947][ C1] [] irqentry_exit+0x516/0xd78 [ 894.299796][ C1] [] do_irq+0x34/0x4c [ 894.300596][ C1] [] handle_exception+0x13c/0x16a [ 894.302675][ C1] Kernel panic - not syncing: kernel: panic_on_warn set ... [ 894.303835][ C1] CPU: 1 UID: 0 PID: 3023 Comm: syslogd Tainted: G W syzkaller #0 PREEMPT [ 894.304788][ C1] Tainted: [W]=WARN [ 894.305061][ C1] Hardware name: riscv-virtio,qemu (DT) [ 894.305352][ C1] Call Trace: [ 894.305622][ C1] [] dump_backtrace+0x2e/0x3c [ 894.306632][ C1] [] show_stack+0x30/0x3c [ 894.307249][ C1] [] dump_stack_lvl+0x114/0x1ac [ 894.308228][ C1] [] dump_stack+0x1c/0x28 [ 894.309172][ C1] [] vpanic+0x32e/0x75c [ 894.309832][ C1] [] panic+0xa0/0xa4 [ 894.310439][ C1] [] check_panic_on_warn+0xc0/0xe4 [ 894.311120][ C1] [] __warn+0x216/0x630 [ 894.311777][ C1] [] __report_bug+0x1d4/0x2ac [ 894.312514][ C1] [] report_bug+0xd8/0x28c [ 894.313218][ C1] [] handle_break+0x13a/0x30c [ 894.314066][ C1] [] do_trap_break+0x22e/0x458 [ 894.314978][ C1] [] handle_exception+0x15e/0x16a [ 894.315892][ C1] [] rcu_note_context_switch+0xf7c/0x1a90 [ 894.316707][ C1] [] __schedule+0x2b2/0x4dec [ 894.317309][ C1] [] schedule+0xb4/0x334 [ 894.317906][ C1] [] irqentry_exit+0x516/0xd78 [ 894.318777][ C1] [] do_irq+0x34/0x4c [ 894.319584][ C1] [] handle_exception+0x13c/0x16a [ 894.320834][ C1] SMP: stopping secondary CPUs