Files
linux/drivers/misc/cxl
Vaibhav Jain 5fc8d62d19 cxl: Check if vphb exists before iterating over AFU devices
commit 12841f87b7 upstream.

During an eeh a kernel-oops is reported if no vPHB is allocated to the
AFU. This happens as during AFU init, an error in creation of vPHB is
a non-fatal error. Hence afu->phb should always be checked for NULL
before iterating over it for the virtual AFU pci devices.

This patch fixes the kenel-oops by adding a NULL pointer check for
afu->phb before it is dereferenced.

Fixes: 9e8df8a219 ("cxl: EEH support")
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-25 14:22:08 +01:00
..
2017-10-05 09:41:47 +02:00
2017-10-05 09:41:47 +02:00
2015-08-17 13:56:29 +10:00
2016-09-15 08:27:41 +02:00
2015-12-08 16:57:01 +11:00
2015-01-22 17:31:51 +11:00
2015-07-13 10:10:54 +10:00