linux/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 s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
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 mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
hypfs fs_parse: fold fs_parameter_desc/fs_parameter_spec 2020-02-07 14:48:37 -05:00
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 s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: fix hot-plug of PCI function missing bus 2020-11-03 15:12:16 +01:00
purgatory .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
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 kbuild: remove cc-option test of -ffreestanding 2020-07-07 11:13:10 +09:00