Re: [v2, 2/3] powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev

From: Michael Ellerman
Date: Thu Apr 06 2017 - 09:06:25 EST


On Mon, 2017-04-03 at 09:51:43 UTC, Alistair Popple wrote:
> The pnv_pci_get_{gpu|npu}_dev functions are used to find associations
> between nvlink PCIe devices and standard PCIe devices. However they
> lacked basic sanity checking which results in NULL pointer
> dereferencing if they are incorrect called can be harder to spot than
> an explicit WARN_ON.
>
> Signed-off-by: Alistair Popple <alistair@xxxxxxxxxxxx>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/4c3b89effc281704d5395282c800c4

cheers