}
if (permission_fault(esr) && (addr < USER_DS)) {
+ if (get_thread_info(regs->sp)->addr_limit == KERNEL_DS)
+ panic("Accessing user space memory with fs=KERNEL_DS");
+
if (!search_exception_tables(regs->pc))
panic("Accessing user space memory outside uaccess.h routines");
}