mei: make polling wait interruptible

Polling thread wait should be interruptible to avoid stuck task.

Reviewed-by: Menachem Adin <menachem.adin@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://patch.msgid.link/20260831-cri_polling-v1-1-d927315e6598@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Usyskin 2026-08-31 14:38:31 +03:00 committed by Greg Kroah-Hartman
parent 01c2f21ae4
commit fa013b91c0
2 changed files with 4 additions and 4 deletions

View File

@ -242,7 +242,7 @@ static int __maybe_unused mei_gsc_pm_runtime_resume(struct device *device)
if (mei_me_hw_use_polling(hw)) {
hw->is_active = true;
wake_up(&hw->wait_active);
wake_up_interruptible(&hw->wait_active);
}
mutex_unlock(&dev->device_lock);

View File

@ -1441,9 +1441,9 @@ int mei_me_polling_thread(void *_dev)
struct mei_me_hw *hw = to_me_hw(dev);
u32 hcsr;
wait_event_timeout(hw->wait_active,
hw->is_active || kthread_should_stop(),
msecs_to_jiffies(MEI_POLLING_TIMEOUT_IDLE));
wait_event_interruptible_timeout(hw->wait_active,
hw->is_active || kthread_should_stop(),
msecs_to_jiffies(MEI_POLLING_TIMEOUT_IDLE));
if (kthread_should_stop())
break;