powerpc/iommu: avoid derefence before pointer check

Michael Ellerman patch-notifications at ellerman.id.au
Thu Sep 20 14:20:59 AEST 2018


On Tue, 2018-08-21 at 18:44:48 UTC, Breno Leitao wrote:
> The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check if
> it is not NULL.
> 
> Just moving the dereference code to after the check, where there will be
> guarantee that 'tbl' will not be NULL.
> 
> CC: Alistair Popple <alistair at popple.id.au>
> Signed-off-by: Breno Leitao <leitao at debian.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/984ecdd68de0fa1f63ce205d6c19ef

cheers


More information about the Linuxppc-dev mailing list