linux-stable/arch/s390/mm
Heiko Carstens e6ec07dc6d s390/mm: fix NULL pointer dereference
The recently added check to figure out if a fault happened on gmap ASCE
dereferences the gmap pointer in lowcore without checking that it is not
NULL. For all non-KVM processes the pointer is NULL, so that some value
from lowcore will be read. With the current layouts of struct gmap and
struct lowcore the read value (aka ASCE) is zero, so that this doesn't lead
to any observable bug; at least currently.

Fix this by adding the missing NULL pointer check.

Fixes: 64c3431808 ("s390/entry: compare gmap asce to determine guest/host fault")
Acked-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2024-04-03 15:00:19 +02:00
..
cmm.c S390: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
dump_pagetables.c mm: ptdump: have ptdump_check_wx() return bool 2024-02-22 10:24:47 -08:00
extable.c s390: add support for DCACHE_WORD_ACCESS 2023-10-16 13:04:09 +02:00
extmem.c s390/extmem: fix virtual vs physical address confusion 2024-02-09 13:58:16 +01:00
fault.c s390/mm: fix NULL pointer dereference 2024-04-03 15:00:19 +02:00
gmap.c mm/treewide: replace pud_large() with pud_leaf() 2024-03-06 13:04:19 -08:00
hugetlbpage.c mm/treewide: replace pud_large() with pud_leaf() 2024-03-06 13:04:19 -08:00
init.c arm64, powerpc, riscv, s390, x86: ptdump: refactor CONFIG_DEBUG_WX 2024-02-22 10:24:47 -08:00
maccess.c s390/ctlreg: rename ctl_reg.h to ctlreg.h 2023-09-19 13:26:56 +02:00
Makefile s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
mmap.c s390/mmap: disable mmap alignment when randomize_va_space = 0 2024-02-09 13:58:14 +01:00
page-states.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00
pageattr.c mm/treewide: replace pud_large() with pud_leaf() 2024-03-06 13:04:19 -08:00
pfault.c s390/pfault: use consistent comment style 2023-07-29 14:57:18 +02:00
pgalloc.c s390: supplement for ptdesc conversion 2024-03-06 13:04:18 -08:00
pgtable.c mm/treewide: replace pud_large() with pud_leaf() 2024-03-06 13:04:19 -08:00
physaddr.c s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
vmem.c mm/treewide: replace pud_large() with pud_leaf() 2024-03-06 13:04:19 -08:00