BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1460 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 2022, name: sshd preempt_count: 0, expected: 0 RCU nest depth: 0, expected: 0 no locks held by sshd/2022. irq event stamp: 225594 hardirqs last enabled at (225593): [] __local_bh_enable_ip+0x1ac/0x2a4 kernel/softirq.c:388 hardirqs last disabled at (225594): [] __trace_hardirqs_off+0x18/0x20 arch/riscv/kernel/trace_irq.c:25 softirqs last enabled at (225592): [] spin_unlock_bh include/linux/spinlock.h:394 [inline] softirqs last enabled at (225592): [] release_sock+0xf6/0x122 net/core/sock.c:3322 softirqs last disabled at (225590): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (225590): [] release_sock+0x2a/0x122 net/core/sock.c:3309 CPU: 1 PID: 2022 Comm: sshd Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119 [] __dump_stack lib/dump_stack.c:88 [inline] [] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106 [] dump_stack+0x1c/0x24 lib/dump_stack.c:113 [] __might_resched+0x30a/0x342 kernel/sched/core.c:9583 [] __might_sleep+0x5e/0x8e kernel/sched/core.c:9512 [] down_read+0x24/0x54 kernel/locking/rwsem.c:1460 [] mmap_read_lock include/linux/mmap_lock.h:117 [inline] [] do_page_fault+0x24e/0xa3c arch/riscv/mm/fault.c:285 [] ret_from_exception+0x0/0x10