summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorYao Yiqi <yaoyiqi3@huawei.com>2026-11-10 21:59:59 +0800
committerHelge Deller <deller@gmx.de>2026-11-19 07:08:56 +0100
commitb3a3f241dace3d4a775e1401b53a3f6d304534f0 (patch)
tree36fd991bf2187041a5e291f8e4bfb6c4d0fa23b9 /tools/perf/scripts/python/bin
parentb438bb88f65a8b464ad08057873db9605cdae945 (diff)
fbcon: Avoid cancel_delayed_work_sync() in atomic context
fbcon_cursor() can be reached from the console printing path, which runs in atomic context. When the VT software cursor is enabled (vc_cursor_type & CUR_SW), it calls fbcon_del_cursor_work(), which uses cancel_delayed_work_sync() and therefore may sleep. With CONFIG_DEBUG_ATOMIC_SLEEP enabled, the following is reported: BUG: sleeping function called from invalid context at kernel/workqueue.c:4722 in_atomic(): 1, irqs_disabled(): 1, non_block: 0 ... __cancel_work_sync fbcon_del_cursor_work fbcon_cursor hide_cursor vt_console_print console_unlock ... Make the default helper safe: fbcon_del_cursor_work() only stops blinking, using cancel_delayed_work(), which is allowed in any context. Every "stop blinking" call site keeps using it, including fbcon_cursor(). Only fbcon_release(), which is about to free @par and must ensure that no callback is still using it, calls the separate fbcon_del_cursor_work_sync(). New call sites therefore get the safe variant by default. cancel_delayed_work() does not wait for a callback that is already running. Since fb_flashcursor() re-arms itself, a callback that has already been dequeued by process_one_work() can queue the work again after fbcon_del_cursor_work() returns. Add a cursor_blink_on flag to struct fbcon_par: fbcon_add_cursor_work() sets it, fbcon_del_cursor_work() clears it, and fb_flashcursor() checks it after taking console_lock and returns without drawing or re-arming once blinking has been stopped. Keep the requeue inside the console_lock section so that the flag check and the requeue are not split by a concurrent stop. Fixes: 3b0fb6ab25dd ("fbcon: Use delayed work for cursor") Cc: stable@vger.kernel.org Assisted-by: Opencode:deepseek-v4.1-flash Signed-off-by: Yao Yiqi <yaoyiqi3@huawei.com> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions