aboutsummaryrefslogtreecommitdiffstats
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorKalesh Singh <[email protected]>2020-12-29 23:14:40 +0000
committerLinus Torvalds <[email protected]>2020-12-29 23:36:49 +0000
commite05986ee7a5814bec0e0075d813daca3d46e4a9e (patch)
tree49d3a5bbfa9d636584d8e449c349cd0d75663bff /lib/genalloc.c
parentmm: memmap defer init doesn't work as expected (diff)
downloadkernel-e05986ee7a5814bec0e0075d813daca3d46e4a9e.tar.gz
kernel-e05986ee7a5814bec0e0075d813daca3d46e4a9e.zip
mm/mremap.c: fix extent calculation
When `next < old_addr`, `next - old_addr` arithmetic underflows causing `extent` to be incorrect. Make `extent` the smaller of `next - old_addr` or `old_end - old_addr`. Link: https://lkml.kernel.org/r/[email protected] Fixes: c49dd34018026 ("mm: speedup mremap on 1GB or larger regions") Signed-off-by: Kalesh Singh <[email protected]> Reported-by: Guenter Roeck <[email protected]> Tested-by: Guenter Roeck <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Lokesh Gidra <[email protected]> Cc: Helge Deller <[email protected]> Cc: Kalesh Singh <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions