powerpc/mm: Make NULL pointer deferences explicit on bad page faults.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 14 Dec 2018 15:23:33 +0000 (15:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:20:42 +0000 (09:20 +0100)
commitba87ed0ad7c1ab3f3a335372be96c7fdab0edb3c
tree6171d8ad5e9b004918d7b8e5c7e6d8d844b61414
parentd02f0fc975b25d3934490d6625310fe95c04ae66
powerpc/mm: Make NULL pointer deferences explicit on bad page faults.

[ Upstream commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb ]

As several other arches including x86, this patch makes it explicit
that a bad page fault is a NULL pointer dereference when the fault
address is lower than PAGE_SIZE

In the mean time, this page makes all bad_page_fault() messages
shorter so that they remain on one single line. And it prefixes them
by "BUG: " so that they get easily grepped.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Avoid pr_cont()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/mm/fault.c