Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

csky: Add faulthandler_disabled() check

Similar to other architectures:
In addition to in_atomic, we also need pagefault_disabled() to
check.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>

Guo Ren 06f3f764 3e455cf5

+2 -2
+2 -2
arch/csky/mm/fault.c
··· 143 143 return; 144 144 } 145 145 146 - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); 147 146 /* 148 147 * If we're in an interrupt or have no user 149 148 * context, we must not take the fault.. 150 149 */ 151 - if (in_atomic() || !mm) 150 + if (unlikely(faulthandler_disabled() || !mm)) 152 151 goto bad_area_nosemaphore; 153 152 154 153 if (user_mode(regs)) ··· 156 157 if (is_write(regs)) 157 158 flags |= FAULT_FLAG_WRITE; 158 159 160 + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); 159 161 retry: 160 162 mmap_read_lock(mm); 161 163 vma = find_vma(mm, address);