mprotect.c (7da4d641c58d201c3cc1835c05ca1a7fa26f0856) | mprotect.c (1233d588210737ed3696b44c26e71dfa44a6995a) |
---|---|
1/* 2 * mm/mprotect.c 3 * 4 * (C) Copyright 1994 Linus Torvalds 5 * (C) Copyright 2002 Christoph Hellwig 6 * 7 * Address space accounting code <alan@lxorguk.ukuu.org.uk> 8 * (C) Copyright 2002 Red Hat Inc, All Rights Reserved --- 139 unchanged lines hidden (view full) --- 148 do { 149 next = pgd_addr_end(addr, end); 150 if (pgd_none_or_clear_bad(pgd)) 151 continue; 152 pages += change_pud_range(vma, pgd, addr, next, newprot, 153 dirty_accountable); 154 } while (pgd++, addr = next, addr != end); 155 | 1/* 2 * mm/mprotect.c 3 * 4 * (C) Copyright 1994 Linus Torvalds 5 * (C) Copyright 2002 Christoph Hellwig 6 * 7 * Address space accounting code <alan@lxorguk.ukuu.org.uk> 8 * (C) Copyright 2002 Red Hat Inc, All Rights Reserved --- 139 unchanged lines hidden (view full) --- 148 do { 149 next = pgd_addr_end(addr, end); 150 if (pgd_none_or_clear_bad(pgd)) 151 continue; 152 pages += change_pud_range(vma, pgd, addr, next, newprot, 153 dirty_accountable); 154 } while (pgd++, addr = next, addr != end); 155 |
156 flush_tlb_range(vma, start, end); | 156 /* Only flush the TLB if we actually modified any entries: */ 157 if (pages) 158 flush_tlb_range(vma, start, end); |
157 158 return pages; 159} 160 161unsigned long change_protection(struct vm_area_struct *vma, unsigned long start, 162 unsigned long end, pgprot_t newprot, 163 int dirty_accountable) 164{ --- 196 unchanged lines hidden --- | 159 160 return pages; 161} 162 163unsigned long change_protection(struct vm_area_struct *vma, unsigned long start, 164 unsigned long end, pgprot_t newprot, 165 int dirty_accountable) 166{ --- 196 unchanged lines hidden --- |