Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: hp-wmi: avoid cancel_delayed_work_sync from work handler

hp_wmi_apply_fan_settings() uses cancel_delayed_work_sync() to stop
the keep-alive timer in AUTO mode. However, since
hp_wmi_apply_fan_settings() is also called from the keep-alive
handler, a race condition with a sysfs write can cause the handler to
wait on itself, leading to a deadlock.

Replace cancel_delayed_work_sync() with cancel_delayed_work() in
hp_wmi_apply_fan_settings() to avoid the self-flush deadlock.

Fixes: c203c59fb5de ("platform/x86: hp-wmi: implement fan keep-alive")
Signed-off-by: Emre Cecanpunar <emreleno@gmail.com>
Link: https://patch.msgid.link/20260407142515.20683-3-emreleno@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Emre Cecanpunar and committed by
Ilpo Järvinen
249ddba9 7265b57f

+1 -1
+1 -1
drivers/platform/x86/hp/hp-wmi.c
··· 2384 2384 } 2385 2385 if (ret < 0) 2386 2386 return ret; 2387 - cancel_delayed_work_sync(&priv->keep_alive_dwork); 2387 + cancel_delayed_work(&priv->keep_alive_dwork); 2388 2388 return 0; 2389 2389 default: 2390 2390 /* shouldn't happen */