Files
linux/drivers/pcmcia
Dominik Brodowski a328c29bc8 pcmcia: fix setting of kthread task states
[ Upstream commit fbb3485f1f ]

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: Al Viro <viro@ZenIV.linux.org.uk>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Fixes: d3046ba809 ("pcmcia: fix a boot time warning in pcmcia cs code")
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 08:47:35 +01:00
..
2015-01-12 05:04:12 -08:00
2016-09-12 10:57:00 +01:00
2010-11-01 15:38:34 -04:00
2010-11-01 15:38:34 -04:00
2015-03-16 21:31:43 +01:00
2015-03-16 21:31:43 +01:00
2010-11-10 14:29:09 +01:00
2012-05-07 09:56:39 +08:00
2015-01-12 05:04:12 -08:00
2012-11-28 12:10:16 -08:00