android_kernel_xiaomi_sm8350/drivers/pcmcia
Dominik Brodowski ff09d5951b 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: 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 09:19:37 +01:00
..
at91_cf.c
bcm63xx_pcmcia.c
bcm63xx_pcmcia.h
cardbus.c
cirrus.h
cistpl.c
cs_internal.h
cs.c pcmcia: fix setting of kthread task states 2022-01-27 09:19:37 +01:00
db1xxx_ss.c
ds.c
electra_cf.c
i82092.c
i82092aa.h
i82365.c
i82365.h
Kconfig
Makefile
max1600.c
max1600.h
o2micro.h
omap_cf.c
pcmcia_cis.c
pcmcia_resource.c
pd6729.c
pd6729.h
pxa2xx_balloon3.c
pxa2xx_base.c
pxa2xx_base.h
pxa2xx_cm_x2xx.c
pxa2xx_cm_x255.c
pxa2xx_cm_x270.c
pxa2xx_colibri.c
pxa2xx_e740.c
pxa2xx_hx4700.c
pxa2xx_mainstone.c
pxa2xx_palmld.c
pxa2xx_palmtc.c
pxa2xx_palmtx.c
pxa2xx_sharpsl.c
pxa2xx_stargate2.c
pxa2xx_trizeps4.c
pxa2xx_viper.c
pxa2xx_vpac270.c
ricoh.h
rsrc_iodyn.c
rsrc_mgr.c
rsrc_nonstatic.c pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region() 2022-01-27 09:19:35 +01:00
sa11xx_base.c
sa11xx_base.h
sa1100_generic.c
sa1100_generic.h
sa1100_h3600.c
sa1100_simpad.c
sa1111_badge4.c
sa1111_generic.c
sa1111_generic.h
sa1111_jornada720.c
sa1111_lubbock.c
sa1111_neponset.c
soc_common.c
soc_common.h
socket_sysfs.c
tcic.c
tcic.h
ti113x.h
topic.h
vg468.h
vrc4171_card.c
vrc4173_cardu.c
vrc4173_cardu.h
xxs1500_ss.c
yenta_socket.c
yenta_socket.h