.. | .. |
---|
41 | 41 | { |
---|
42 | 42 | pte_t *pte, oldpte; |
---|
43 | 43 | spinlock_t *ptl; |
---|
44 | | - unsigned long pages = 0; |
---|
| 44 | + unsigned long pages = 0, flags; |
---|
45 | 45 | int target_node = NUMA_NO_NODE; |
---|
46 | 46 | bool dirty_accountable = cp_flags & MM_CP_DIRTY_ACCT; |
---|
47 | 47 | bool prot_numa = cp_flags & MM_CP_PROT_NUMA; |
---|
.. | .. |
---|
113 | 113 | continue; |
---|
114 | 114 | } |
---|
115 | 115 | |
---|
| 116 | + flags = hard_local_irq_save(); |
---|
116 | 117 | oldpte = ptep_modify_prot_start(vma, addr, pte); |
---|
117 | 118 | ptent = pte_modify(oldpte, newprot); |
---|
118 | 119 | if (preserve_write) |
---|
.. | .. |
---|
138 | 139 | ptent = pte_mkwrite(ptent); |
---|
139 | 140 | } |
---|
140 | 141 | ptep_modify_prot_commit(vma, addr, pte, oldpte, ptent); |
---|
| 142 | + hard_local_irq_restore(flags); |
---|
141 | 143 | pages++; |
---|
142 | 144 | } else if (is_swap_pte(oldpte)) { |
---|
143 | 145 | swp_entry_t entry = pte_to_swp_entry(oldpte); |
---|