Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c95e70e0 authored by Patrick Daly's avatar Patrick Daly
Browse files

mm: Fix false warnings from apply_to_page_range



This warning message is triggered when addr + size overflows to zero.
This has been observed to occur on ARM64 with CONFIG_RANDOMIZE_BASE=y
when the end of the linear address range is placed at ffffffffffffffff.

Change-Id: I57e34e522a4fc25ab43a0a00be6d0927ea4a1272
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent f6f026ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2271,7 +2271,7 @@ int apply_to_page_range(struct mm_struct *mm, unsigned long addr,
	unsigned long end = addr + size;
	int err;

	if (WARN_ON(addr >= end))
	if (WARN_ON(addr >= end - 1))
		return -EINVAL;

	pgd = pgd_offset(mm, addr);