]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/eeh: Null check uses of eeh_pe_bus_get
authorRussell Currey <ruscur@russell.cc>
Mon, 12 Sep 2016 04:17:22 +0000 (14:17 +1000)
committerJiri Slaby <jslaby@suse.cz>
Tue, 8 Nov 2016 15:38:25 +0000 (16:38 +0100)
commit28fe711180ecba29d36063c8ae37b29469e61cd6
tree4ff961d3f8f3dc5345e84cb8818e102fe8266936
parent526857ca8efea190a020465cc5147f5649d34a97
powerpc/eeh: Null check uses of eeh_pe_bus_get

commit 04fec21c06e35b169a83e75a84a015ab4606bf5e upstream.

eeh_pe_bus_get() can return NULL if a PCI bus isn't found for a given PE.
Some callers don't check this, and can cause a null pointer dereference
under certain circumstances.

Fix this by checking NULL everywhere eeh_pe_bus_get() is called.

Fixes: 8a6b1bc70dbb ("powerpc/eeh: EEH core to handle special event")
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/powerpc/kernel/eeh_driver.c
arch/powerpc/platforms/powernv/eeh-ioda.c