cow-pinning: bark on bad pages
Subsystems (2)
PATCH 1/1 cow-pinning: bark on bad pages
Use Linux standard pattern for walking through the page table hierarchy.
As we know that the warning I once saw with this applied was related to another, already fixed bug, my feeling is far better about this variant now. :)
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
--- mm/memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/memory.c +3 -3
@@ -2827,7 +2827,7 @@ static inline int ipipe_pin_pmd_range(st pmd =pmd_offset (pud, addr); do { next = pmd_addr_end(addr, end); - if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) + if (pmd_none_or_clear_bad(pmd)) continue; if (ipipe_pin_pte_range(mm, pmd, vma, addr, next)) return -ENOMEM;
@@ -2845,7 +2845,7 @@ static inline int ipipe_pin_pud_range(st pud =pud_offset (pgd, addr); do { next = pud_addr_end(addr, end); - if (pud_none(*pud) || unlikely(pud_bad(*pud))) + if (pud_none_or_clear_bad(pud)) continue; if (ipipe_pin_pmd_range(mm, pud, vma, addr, next)) return -ENOMEM;
@@ -2879,7 +2879,7 @@ int ipipe_disable_ondemand_mappings(stru pgd =pgd_offset (mm, addr); do { next = pgd_addr_end(addr, end); - if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd))) + if (pgd_none_or_clear_bad(pgd)) continue; if (ipipe_pin_pud_range(mm, pgd, vma, addr, next)) { result = -ENOMEM;