summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorXiaochuan Li <chuanx2070@163.com>2026-09-24 01:20:32 +0800
committerJens Axboe <axboe@kernel.dk>2026-09-23 11:33:27 -0600
commit8dc68de64261e599631aa7ed6cdf3aec07c7ae3d (patch)
treea32cfbde5eb909ccf47de1df5949ad6e62a93736 /rust/kernel/alloc/kvec/errors.rs
parentefde156d91ba123f5db61b2b47ca94a5dd29c945 (diff)
io_uring/io-wq: release raw spinlock before calling wake_up()
io-wq will hold acct->lock, which is a raw spinlock, over a call to wake_up(), which uses a normal spinlock. This isn't valid nesting under CONFIG_PREEMPT_RT, as normal spinlocks are sleeping locks there, while raw spinlocks operate like classic spinning locks. This triggers a kernel warning: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 985654, name: iou-wrk-983605 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 CPU: 3 PID: 985654 Comm: iou-wrk-983605 Tainted: G O 6.1.83-rt28-g19631eb82f21 stack:0 ppid:977479 flags:0x00000008 tgid:977553 prio:120 preempt:0x100000001 rcu_read_lock_nesting:0 used_cpu 3 wake_cpu 3 on_cpu 3 on_rq 1 migrate_dis 0 arrive:17423426040675 queued:0 prev_sum:33955300 sum_exec:33955300 Call trace: dump_backtrace.part.0+0xdc/0xec show_stack+0x1c/0x30 dump_stack_lvl+0xac/0xc4 dump_stack+0x14/0x30 __might_resched+0x13c/0x170 rt_spin_lock+0x34/0xc0 __wake_up_common_lock+0x68/0xd0 __wake_up+0x1c/0x24 io_worker_handle_work+0x5b0/0x600 io_wqe_worker+0xf4/0x310 ret_from_fork+0x10/0x20 Store whether we need to call wake_up(), and call it safely outside of the acct->lock. Signed-off-by: Xiaochuan Li <chuanx2070@163.com> Link: https://patch.msgid.link/20260923172032.11057-1-chuanx2070@163.com [axboe: rewrite commit message] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions