]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/process.c
Merge branch 'from-linus' into upstream
[karo-tx-linux.git] / arch / powerpc / kernel / process.c
index 1770a066c2176f71afa3e736904d8744bf0e0b84..2dd47d2dd9980ee604829fc3d4a8d42bfd3155b7 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/mqueue.h>
 #include <linux/hardirq.h>
 #include <linux/utsname.h>
-#include <linux/kprobes.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -46,6 +45,7 @@
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/time.h>
+#include <asm/syscalls.h>
 #ifdef CONFIG_PPC64
 #include <asm/firmware.h>
 #endif
@@ -363,7 +363,11 @@ static void show_instructions(struct pt_regs *regs)
                if (!(i % 8))
                        printk("\n");
 
-               if (BAD_PC(pc) || __get_user(instr, (unsigned int *)pc)) {
+               /* We use __get_user here *only* to avoid an OOPS on a
+                * bad address because the pc *should* only be a
+                * kernel address.
+                */
+               if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
                        printk("XXXXXXXX ");
                } else {
                        if (regs->nip == pc)
@@ -460,7 +464,6 @@ void show_regs(struct pt_regs * regs)
 
 void exit_thread(void)
 {
-       kprobe_flush_task(current);
        discard_lazy_cpu_state();
 }
 
@@ -767,7 +770,7 @@ out:
        return error;
 }
 
-static int validate_sp(unsigned long sp, struct task_struct *p,
+int validate_sp(unsigned long sp, struct task_struct *p,
                       unsigned long nbytes)
 {
        unsigned long stack_page = (unsigned long)task_stack_page(p);
@@ -805,6 +808,8 @@ static int validate_sp(unsigned long sp, struct task_struct *p,
 #define FRAME_MARKER   2
 #endif
 
+EXPORT_SYMBOL(validate_sp);
+
 unsigned long get_wchan(struct task_struct *p)
 {
        unsigned long ip, sp;
@@ -829,7 +834,6 @@ unsigned long get_wchan(struct task_struct *p)
        } while (count++ < 16);
        return 0;
 }
-EXPORT_SYMBOL(get_wchan);
 
 static int kstack_depth_to_print = 64;