projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e455cf
)
csky: Add faulthandler_disabled() check
author
Guo Ren
<guoren@linux.alibaba.com>
Mon, 28 Dec 2020 13:01:00 +0000
(13:01 +0000)
committer
Guo Ren
<guoren@linux.alibaba.com>
Tue, 12 Jan 2021 01:52:41 +0000
(09:52 +0800)
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>
arch/csky/mm/fault.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/csky/mm/fault.c
b/arch/csky/mm/fault.c
index cecca6729b0407d7552fd558fdd33112c6dffb70..9533bd8d9a6aed0ba77bb1733421b488f55aa35a 100644
(file)
--- a/
arch/csky/mm/fault.c
+++ b/
arch/csky/mm/fault.c
@@
-143,12
+143,11
@@
asmlinkage void do_page_fault(struct pt_regs *regs)
return;
}
- perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
/*
* If we're in an interrupt or have no user
* context, we must not take the fault..
*/
- if (
in_atomic() || !mm
)
+ if (
unlikely(faulthandler_disabled() || !mm)
)
goto bad_area_nosemaphore;
if (user_mode(regs))
@@
-157,6
+156,7
@@
asmlinkage void do_page_fault(struct pt_regs *regs)
if (is_write(regs))
flags |= FAULT_FLAG_WRITE;
+ perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
retry:
mmap_read_lock(mm);
vma = find_vma(mm, address);