1
0
Fork 0
alistair23-linux/drivers
Jean-Philippe Brucker 92e074acf6 firmware/psci: psci_checker: Park kthreads before stopping them
Since commit 85f1abe001 ("kthread, sched/wait: Fix kthread_parkme()
completion issue"), kthreads that are bound to a CPU must be parked
before being stopped. At the moment the PSCI checker calls
kthread_stop() directly on the suspend kthread, which triggers the
following warning:

[    6.068288] WARNING: CPU: 1 PID: 1 at kernel/kthread.c:398 __kthread_bind_mask+0x20/0x78
               ...
[    6.190151] Call trace:
[    6.192566]  __kthread_bind_mask+0x20/0x78
[    6.196615]  kthread_unpark+0x74/0x80
[    6.200235]  kthread_stop+0x44/0x1d8
[    6.203769]  psci_checker+0x3bc/0x484
[    6.207389]  do_one_initcall+0x48/0x260
[    6.211180]  kernel_init_freeable+0x2c8/0x368
[    6.215488]  kernel_init+0x10/0x100
[    6.218935]  ret_from_fork+0x10/0x1c
[    6.222467] ---[ end trace e05e22863d043cd3 ]---

kthread_unpark() tries to bind the thread to its CPU and aborts with a
WARN() if the thread wasn't in TASK_PARKED state. Park the kthreads
before stopping them.

Fixes: 85f1abe001 ("kthread, sched/wait: Fix kthread_parkme() completion issue")
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-06-17 04:50:21 -07:00
..
accessibility
acpi
amba
android
ata libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk 2019-06-13 03:17:11 -06:00
atm
auxdisplay
base drivers/base/devres: introduce devm_release_action() 2019-06-13 17:34:56 -10:00
bcma
block block/ps3vram: Use %llu to format sector_t after LBDAF removal 2019-06-13 03:17:50 -06:00
bluetooth
bus NXP/FSL SoC driver updates for v5.3 2019-06-17 04:38:06 -07:00
cdrom
char
clk
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-06-16 07:22:56 -10:00
connector
counter
cpufreq
cpuidle
crypto
dax mm/devm_memremap_pages: fix final page put race 2019-06-13 17:34:56 -10:00
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware firmware/psci: psci_checker: Park kthreads before stopping them 2019-06-17 04:50:21 -07:00
fmc
fpga
fsi
gnss
gpio A single fix for the PCA953x driver affecting some fringe 2019-06-14 05:48:29 -10:00
gpu Merge branch 'drm-fixes-5.2' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2019-06-14 17:55:22 +02:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2019-06-13 05:59:05 -10:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c i2c: pca-platform: Fix GPIO lookup code 2019-06-12 12:54:06 +02:00
i3c
ide
idle
iio
infiniband
input
interconnect
iommu IOMMU Fixes for Linux v5.2-rc4 2019-06-14 05:49:35 -10:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md bcache: only set BCACHE_DEV_WB_RUNNING when cached device attached 2019-06-13 03:09:15 -06:00
media media updates for v5.2-rc1 2019-06-12 05:57:05 -10:00
memory memory: move jedec_ddr.h from include/memory to drivers/memory/ 2019-06-17 04:45:21 -07:00
memstick
message
mfd
misc
mmc
mtd
mux
net
nfc
ntb
nubus
nvdimm mm/devm_memremap_pages: fix final page put race 2019-06-13 17:34:56 -10:00
nvme
nvmem
of
opp
oprofile
parisc
parport
pci mm/devm_memremap_pages: fix final page put race 2019-06-13 17:34:56 -10:00
pcmcia
perf
phy
pinctrl
platform platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow 2019-06-12 11:49:20 +03:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20190614 2019-06-14 15:52:51 -10:00
sfi
sh
siox
slimbus
sn
soc NXP/FSL SoC driver updates for v5.3 2019-06-17 04:38:06 -07:00
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
uio
usb usb: typec: Make sure an alt mode exist before getting its partner 2019-06-12 17:13:02 +02:00
uwb
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen Merge branch 'stable/for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2019-06-11 15:38:34 -10:00
zorro
Kconfig
Makefile