X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fx86_64%2Fkernel%2Ftraps.c;h=99d0ec2abd0067a9cef4426da402780909e83b64;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=d82da80d861325a3c6a74f3e5c892a5c93e183c2;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index d82da80d8..99d0ec2ab 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -115,7 +115,7 @@ unsigned long *in_exception_stack(int cpu, unsigned long stack) if (stack >= init_tss[cpu].ist[k] && stack <= end) return (unsigned long *)end; } - return 0; + return NULL; } /* @@ -140,7 +140,7 @@ void show_trace(unsigned long *stack) if (estack_end) { while (stack < estack_end) { addr = *stack++; - if (kernel_text_address(addr)) { + if (__kernel_text_address(addr)) { i += printk_address(addr); i += printk(" "); if (i > 50) { @@ -169,7 +169,7 @@ void show_trace(unsigned long *stack) * down the cause of the crash will be able to figure * out the call path that was taken. */ - if (kernel_text_address(addr)) { + if (__kernel_text_address(addr)) { i += printk_address(addr); i += printk(" "); if (i > 50) { @@ -185,7 +185,7 @@ void show_trace(unsigned long *stack) while (((long) stack & (THREAD_SIZE-1)) != 0) { addr = *stack++; - if (kernel_text_address(addr)) { + if (__kernel_text_address(addr)) { i += printk_address(addr); i += printk(" "); if (i > 50) { @@ -448,7 +448,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ info.si_signo = signr; \ info.si_errno = 0; \ info.si_code = sicode; \ - info.si_addr = (void *)siaddr; \ + info.si_addr = (void __user *)siaddr; \ if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) == NOTIFY_BAD) \ return; \ do_trap(trapnr, signr, str, regs, error_code, &info); \ @@ -662,7 +662,7 @@ asmlinkage void *do_debug(struct pt_regs * regs, unsigned long error_code) if ((regs->cs & 3) == 0) goto clear_dr7; - info.si_addr = (void *)regs->rip; + info.si_addr = (void __user *)regs->rip; force_sig_info(SIGTRAP, &info, tsk); clear_dr7: asm volatile("movq %0,%%db7"::"r"(0UL)); @@ -686,7 +686,7 @@ clear_TF: * the correct behaviour even in the presence of the asynchronous * IRQ13 behaviour */ -void math_error(void *rip) +void math_error(void __user *rip) { struct task_struct * task; siginfo_t info; @@ -743,7 +743,7 @@ void math_error(void *rip) asmlinkage void do_coprocessor_error(struct pt_regs * regs) { conditional_sti(regs); - math_error((void *)regs->rip); + math_error((void __user *)regs->rip); } asmlinkage void bad_intr(void) @@ -751,7 +751,7 @@ asmlinkage void bad_intr(void) printk("bad interrupt"); } -static inline void simd_math_error(void *rip) +static inline void simd_math_error(void __user *rip) { struct task_struct * task; siginfo_t info; @@ -802,7 +802,7 @@ static inline void simd_math_error(void *rip) asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs) { conditional_sti(regs); - simd_math_error((void *)regs->rip); + simd_math_error((void __user *)regs->rip); } asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs)