aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorCarlos Llamas <[email protected]>2025-08-28 14:26:56 +0000
committerAndrew Morton <[email protected]>2025-09-09 06:45:11 +0000
commit78d2d32f0b789d67cbe5cfea0c0714cb2446c37e (patch)
tree199c1ef963935d9e78f11aa6dc0bf4752930bce5 /mm/memory-failure.c
parentpercpu: fix race on alloc failed warning limit (diff)
downloadkernel-78d2d32f0b789d67cbe5cfea0c0714cb2446c37e.tar.gz
kernel-78d2d32f0b789d67cbe5cfea0c0714cb2446c37e.zip
mm/mremap: fix regression in vrm->new_addr check
Commit 3215eaceca87 ("mm/mremap: refactor initial parameter sanity checks") moved the sanity check for vrm->new_addr from mremap_to() to check_mremap_params(). However, this caused a regression as vrm->new_addr is now checked even when MREMAP_FIXED and MREMAP_DONTUNMAP flags are not specified. In this case, vrm->new_addr can be garbage and create unexpected failures. Fix this by moving the new_addr check after the vrm_implies_new_addr() guard. This ensures that the new_addr is only checked when the user has specified one explicitly. Link: https://lkml.kernel.org/r/[email protected] Fixes: 3215eaceca87 ("mm/mremap: refactor initial parameter sanity checks") Signed-off-by: Carlos Llamas <[email protected]> Reviewed-by: Liam R. Howlett <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]> Reviewed-by: Lorenzo Stoakes <[email protected]> Cc: Carlos Llamas <[email protected]> Cc: Jann Horn <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/memory-failure.c')
0 files changed, 0 insertions, 0 deletions