Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ff09d595 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Greg Kroah-Hartman
Browse files

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 <gregkh@linuxfoundation.org>
Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Fixes: d3046ba8 ("pcmcia: fix a boot time warning in pcmcia cs code")
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f56b423b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment