Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pcmcia: fix setting of kthread task states
[ Upstream commit fbb3485f1f931102d8ba606f1c28123f5b48afa3 ] We need to set TASK_INTERRUPTIBLE before calling kthread_should_stop(). Otherwise, kthread_stop() might see that the pccardd thread is still in TASK_RUNNING state and fail to wake it up. Additionally, we only need to set the state back to TASK_RUNNING if kthread_should_stop() breaks the loop. Cc: Greg Kroah-Hartman <[email protected]> Reported-by: Al Viro <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Fixes: d3046ba ("pcmcia: fix a boot time warning in pcmcia cs code") Signed-off-by: Dominik Brodowski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information