Repository navigation
Commit 04ce9e2
pcmcia: fix setting of kthread task states
[ Upstream commit fbb3485 ]
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: d3046ba ("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>1 parent 5064bfe commit 04ce9e2
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
672 | | - | |
673 | | - | |
674 | 673 | | |
675 | 674 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | 675 | | |
680 | 676 | | |
| 677 | + | |
| 678 | + | |
681 | 679 | | |
682 | 680 | | |
683 | 681 | | |
| |||
0 commit comments