mm-pagewalk-fix-termination-condition-in-walk_pte_range.patch removed from -mm tree
The patch titled
Subject: mm: pagewalk: fix termination condition in walk_pte_range()
has been removed from the -mm tree. Its filename was
mm-pagewalk-fix-termination-condition-in-walk_pte_range.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Steven Price <[email protected]>
Subject: mm: pagewalk: fix termination condition in walk_pte_range()
If walk_pte_range() is called with a 'end' argument that is beyond the last page of memory (e.g. ~0UL) then the comparison between 'addr' and 'end' will always fail and the loop will be infinite. Instead change the comparison to >= while accounting for overflow.
---
mm/pagewalk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/pagewalk.c renamed from mm/pagewalk.c~mm-pagewalk-fix-termination-condition-in-walk_pte_range +2 -2
@@ -14,9 +14,9 @@ static int walk_pte_range_inner(pte_t *p err = ops->pte_entry (pte, addr, addr +PAGE_SIZE , walk);if (err)break ; - addr +=PAGE_SIZE ; -if (addr == end) +if (addr >= end -PAGE_SIZE )break ; + addr +=PAGE_SIZE ; pte++; }return err;
_
Patches currently in -mm which might be from [email protected] are