kernel_samsung_a53x/include
Waiman Long a66805274e mm: prevent derefencing NULL ptr in pfn_section_valid()
[ Upstream commit 82f0b6f041fad768c28b4ad05a683065412c226e ]

Commit 5ec8e8ea8b77 ("mm/sparsemem: fix race in accessing
memory_section->usage") changed pfn_section_valid() to add a READ_ONCE()
call around "ms->usage" to fix a race with section_deactivate() where
ms->usage can be cleared.  The READ_ONCE() call, by itself, is not enough
to prevent NULL pointer dereference.  We need to check its value before
dereferencing it.

Link: https://lkml.kernel.org/r/20240626001639.1350646-1-longman@redhat.com
Fixes: 5ec8e8ea8b77 ("mm/sparsemem: fix race in accessing memory_section->usage")
Signed-off-by: Waiman Long <longman@redhat.com>
Cc: Charan Teja Kalla <quic_charante@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:43 +01:00
..
acpi
asm-generic
clocksource
crypto
drm drm/mipi-dsi: use correct return type for the DSC functions 2024-11-19 12:26:58 +01:00
dt-bindings
keys
kunit
kvm
linux mm: prevent derefencing NULL ptr in pfn_section_valid() 2024-11-19 14:19:43 +01:00
math-emu
media
memory
misc
net netfilter: nf_tables: fully validate NFT_DATA_VALUE on store to data registers 2024-11-19 14:19:32 +01:00
pcmcia
ras
rdma
scsc
scsi
sdp
soc soc: fsl: qbman: Add CGR update function 2024-11-19 09:22:35 +01:00
sound ASoC: soc-acpi: add helper to identify parent driver. 2024-11-19 12:26:57 +01:00
target
test
trace tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset() 2024-11-19 14:19:39 +01:00
uapi syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-11-19 14:19:34 +01:00
variant1/linux
vdso
video
xen