acrn-kernel/arch/s390
Niklas Schnelle 0b2ca2c7d0 s390/pci: fix hot-plug of PCI function missing bus
Under some circumstances in particular with "Reconfigure I/O Path"
a zPCI function may first appear in Standby through a PCI event with
PEC 0x0302 which initially makes it visible to the zPCI subsystem,
Only after that is it configured with a zPCI event  with PEC 0x0301.
If the zbus is still missing a PCI function zero (devfn == 0) when the
PCI event 0x0301 is handled zdev->zbus->bus is still NULL and gets
dereferenced in common code.
Check for this case and enable but don't scan the zPCI function.
This matches what would happen if we immediately got the 0x0301
configuration request or the function was included in CLP List PCI.
In all cases the PCI functions with devfn != 0 will be scanned once
function 0 appears.

Fixes: 3047766bc6 ("s390/pci: fix enabling a reserved PCI function")
Cc: <stable@vger.kernel.org> # 5.8
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Acked-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2020-11-03 15:12:16 +01:00
..
appldata
boot treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
configs s390: update defconfigs 2020-11-03 15:12:16 +01:00
crypto
hypfs
include s390/vdso: remove empty unused file 2020-11-03 15:12:15 +01:00
kernel s390/smp: move rcu_cpu_starting() earlier 2020-11-03 15:12:16 +01:00
kvm mm/gup: remove task_struct pointer for all gup code 2020-08-12 10:58:04 -07:00
lib s390/lib: fix kernel doc for memcmp() 2020-10-07 21:50:01 +02:00
mm treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
net s390/bpf: Fix multiple tail calls 2020-09-14 18:21:31 -07:00
oprofile
pci s390/pci: fix hot-plug of PCI function missing bus 2020-11-03 15:12:16 +01:00
purgatory
tools
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig vhost,vdpa,virtio: cleanups, fixes 2020-10-23 11:00:57 -07:00
Kconfig.debug s390/mm,ptdump: convert to generic page table dumper 2020-09-14 11:38:34 +02:00
Makefile