]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/eeh: Fix possible null deref in eeh_dump_dev_log()
authorSam Bobroff <sbobroff@linux.ibm.com>
Wed, 12 Sep 2018 01:23:20 +0000 (11:23 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:21:56 +0000 (09:21 +0100)
commit45394cc9a3c448ddf22c2271f4f328cc7a2f2823
tree2aa319bb360116419919d5cf203b3348be5d3793
parent6fc2ea8572973dd9d05f91d6417786cb42cb97ab
powerpc/eeh: Fix possible null deref in eeh_dump_dev_log()

[ Upstream commit f9bc28aedfb5bbd572d2d365f3095c1becd7209b ]

If an error occurs during an unplug operation, it's possible for
eeh_dump_dev_log() to be called when edev->pdn is null, which
currently leads to dereferencing a null pointer.

Handle this by skipping the error log for those devices.

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/eeh.c