if(!pte_dirty(*npte)) w = 0; if(!pte_young(*npte)){ r = 0; w = 0; } 
if (!pte_young(*npte)) { r = 0; w = 0; } else if (!pte_dirty(*npte)) { w = 0; } 
void fix_range_common(struct mm_struct *mm, unsigned long start_addr,                      unsigned long end_addr, int force,		      int (*do_ops)(union mm_context *, struct host_vm_op *,				    int, int, void **)){        pgd_t *npgd;        pud_t *npud;        pmd_t *npmd;        pte_t *npte;        union mm_context *mmu = &mm->context;        unsigned long addr, end;        int r, w, x;        struct host_vm_op ops[1];        void *flush = NULL;        int op_index = -1, last_op = sizeof(ops) / sizeof(ops[0]) - 1;        int ret = 0;        if(mm == NULL) return;        ops[0].type = NONE;        for(addr = start_addr; addr < end_addr && !ret;){                npgd = pgd_offset(mm, addr);                if(!pgd_present(*npgd)){                        end = ADD_ROUND(addr, PGDIR_SIZE);                        if(end > end_addr)                                end = end_addr;                        if(force || pgd_newpage(*npgd)){                                ret = add_munmap(addr, end - addr, ops,                                                 &op_index, last_op, mmu,                                                 &flush, do_ops);                                pgd_mkuptodate(*npgd);                        }                        addr = end;                        continue;                }                npud = pud_offset(npgd, addr);                if(!pud_present(*npud)){                        end = ADD_ROUND(addr, PUD_SIZE);                        if(end > end_addr)                                end = end_addr;                        if(force || pud_newpage(*npud)){                                ret = add_munmap(addr, end - addr, ops,                                                 &op_index, last_op, mmu,                                                 &flush, do_ops);                                pud_mkuptodate(*npud);                        }                        addr = end;                        continue;                }                npmd = pmd_offset(npud, addr);                if(!pmd_present(*npmd)){                        end = ADD_ROUND(addr, PMD_SIZE);                        if(end > end_addr)                                end = end_addr;                        if(force || pmd_newpage(*npmd)){                                ret = add_munmap(addr, end - addr, ops,                                                 &op_index, last_op, mmu,                                                 &flush, do_ops);                                pmd_mkuptodate(*npmd);                        }                        addr = end;                        continue;                }                npte = pte_offset_kernel(npmd, addr);                r = pte_read(*npte);                w = pte_write(*npte);                x = pte_exec(*npte);                if(!pte_dirty(*npte))                        w = 0;                if(!pte_young(*npte)){                        r = 0;                        w = 0;                }                if(force || pte_newpage(*npte)){                        if(pte_present(*npte))			  ret = add_mmap(addr,					 pte_val(*npte) & PAGE_MASK,					 PAGE_SIZE, r, w, x, ops,					 &op_index, last_op, mmu,					 &flush, do_ops);			else ret = add_munmap(addr, PAGE_SIZE, ops,					      &op_index, last_op, mmu,					      &flush, do_ops);                }                else if(pte_newprot(*npte))			ret = add_mprotect(addr, PAGE_SIZE, r, w, x, ops,					   &op_index, last_op, mmu,					   &flush, do_ops);                *npte = pte_mkuptodate(*npte);                addr += PAGE_SIZE;        }	if(!ret)		ret = (*do_ops)(mmu, ops, op_index, 1, &flush);	/* This is not an else because ret is modified above */	if(ret) {		printk("fix_range_common: failed, killing current process\n");		force_sig(SIGKILL, current);	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/dc36abf34e13aabbe06cdd060c434b3cdd80e7da/tlb.c/clean/arch/um/kernel/tlb.c