mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
microblaze: Fix do_page_fault for no context
Calling fixup when we are in kernel mode. This prevent fault for copy_to/from_user. This fault was find thanks to writev01/03/04 LTP tests. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
f14d6f7c31
commit
f10eca6e10
@ -122,15 +122,10 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_KGDB */
|
#endif /* CONFIG_KGDB */
|
||||||
|
|
||||||
if (in_atomic() || mm == NULL) {
|
if (in_atomic() || !mm) {
|
||||||
/* FIXME */
|
if (kernel_mode(regs))
|
||||||
if (kernel_mode(regs)) {
|
goto bad_area_nosemaphore;
|
||||||
printk(KERN_EMERG
|
|
||||||
"Page fault in kernel mode - Oooou!!! pid %d\n",
|
|
||||||
current->pid);
|
|
||||||
_exception(SIGSEGV, regs, code, address);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* in_atomic() in user mode is really bad,
|
/* in_atomic() in user mode is really bad,
|
||||||
as is current->mm == NULL. */
|
as is current->mm == NULL. */
|
||||||
printk(KERN_EMERG "Page fault in user mode with "
|
printk(KERN_EMERG "Page fault in user mode with "
|
||||||
|
Loading…
Reference in New Issue
Block a user