@@ -188,9 +188,9 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)
}
} else {
if (thumb)
- bad = get_user(val, &((u16 *)addr)[i]);
+ bad = get_user(val, &((u16 __user *)addr)[i]);
else
- bad = get_user(val, &((u32 *)addr)[i]);
+ bad = get_user(val, &((u32 __user *)addr)[i]);
}
if (!bad)
@@ -448,9 +448,9 @@ int call_undef_hook(struct pt_regs *regs, unsigned int instr)
asmlinkage void do_undefinstr(struct pt_regs *regs)
{
unsigned int instr;
- void __user *pc;
+ void *pc;
- pc = (void __user *)instruction_pointer(regs);
+ pc = (void *)instruction_pointer(regs);
if (processor_mode(regs) == SVC_MODE) {
#ifdef CONFIG_THUMB2_KERNEL
@@ -494,7 +494,7 @@ asmlinkage void do_undefinstr(struct pt_regs *regs)
}
#endif
arm_notify_die("Oops - undefined instruction", regs,
- SIGILL, ILL_ILLOPC, pc, 0, 6);
+ SIGILL, ILL_ILLOPC, (void __user *)pc, 0, 6);
}
NOKPROBE_SYMBOL(do_undefinstr)
Fix the following warnings: warning: incorrect type in initializer (different address spaces) expected unsigned short [noderef] __user *register __p got unsigned short [usertype] * warning: cast removes address space '__user' of expression Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- arch/arm/kernel/traps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)