VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / arch / x86_64 / kernel / traps.c
index d82da80..99d0ec2 100644 (file)
@@ -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)