mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
01c2f21ae4
commit
fa013b91c0
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user