Commit 76fcdc8
cxl: Check if vphb exists before iterating over AFU devices
commit 12841f8 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: 9e8df8a ("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>1 parent b632d71 commit 76fcdc8
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
1761 | 1764 | | |
1762 | 1765 | | |
1763 | 1766 | | |
| |||
1801 | 1804 | | |
1802 | 1805 | | |
1803 | 1806 | | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1804 | 1812 | | |
1805 | 1813 | | |
1806 | 1814 | | |
| |||
1941 | 1949 | | |
1942 | 1950 | | |
1943 | 1951 | | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
1944 | 1955 | | |
1945 | 1956 | | |
1946 | 1957 | | |
| |||
2003 | 2014 | | |
2004 | 2015 | | |
2005 | 2016 | | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
2006 | 2020 | | |
2007 | 2021 | | |
2008 | 2022 | | |
| |||
0 commit comments