aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/branch.c5
-rw-r--r--arch/mips/kernel/traps.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c
index 76fd3f22c766..6b5df8bfab85 100644
--- a/arch/mips/kernel/branch.c
+++ b/arch/mips/kernel/branch.c
@@ -22,7 +22,8 @@
22 */ 22 */
23int __compute_return_epc(struct pt_regs *regs) 23int __compute_return_epc(struct pt_regs *regs)
24{ 24{
25 unsigned int *addr, bit, fcr31, dspcontrol; 25 unsigned int __user *addr;
26 unsigned int bit, fcr31, dspcontrol;
26 long epc; 27 long epc;
27 union mips_instruction insn; 28 union mips_instruction insn;
28 29
@@ -33,7 +34,7 @@ int __compute_return_epc(struct pt_regs *regs)
33 /* 34 /*
34 * Read the instruction 35 * Read the instruction
35 */ 36 */
36 addr = (unsigned int *) epc; 37 addr = (unsigned int __user *) epc;
37 if (__get_user(insn.word, addr)) { 38 if (__get_user(insn.word, addr)) {
38 force_sig(SIGSEGV, current); 39 force_sig(SIGSEGV, current);
39 return -EFAULT; 40 return -EFAULT;
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 5e9fa83c4ef0..37c562c4c817 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -131,7 +131,7 @@ static void show_stacktrace(struct task_struct *task, struct pt_regs *regs)
131 const int field = 2 * sizeof(unsigned long); 131 const int field = 2 * sizeof(unsigned long);
132 long stackdata; 132 long stackdata;
133 int i; 133 int i;
134 unsigned long *sp = (unsigned long *)regs->regs[29]; 134 unsigned long __user *sp = (unsigned long __user *)regs->regs[29];
135 135
136 printk("Stack :"); 136 printk("Stack :");
137 i = 0; 137 i = 0;
@@ -187,7 +187,7 @@ void dump_stack(void)
187 187
188EXPORT_SYMBOL(dump_stack); 188EXPORT_SYMBOL(dump_stack);
189 189
190void show_code(unsigned int *pc) 190static void show_code(unsigned int __user *pc)
191{ 191{
192 long i; 192 long i;
193 193
@@ -305,7 +305,7 @@ void show_registers(struct pt_regs *regs)
305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", 305 printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n",
306 current->comm, current->pid, current_thread_info(), current); 306 current->comm, current->pid, current_thread_info(), current);
307 show_stacktrace(current, regs); 307 show_stacktrace(current, regs);
308 show_code((unsigned int *) regs->cp0_epc); 308 show_code((unsigned int __user *) regs->cp0_epc);
309 printk("\n"); 309 printk("\n");
310} 310}
311 311
@@ -865,7 +865,7 @@ asmlinkage void do_mcheck(struct pt_regs *regs)
865 dump_tlb_all(); 865 dump_tlb_all();
866 } 866 }
867 867
868 show_code((unsigned int *) regs->cp0_epc); 868 show_code((unsigned int __user *) regs->cp0_epc);
869 869
870 /* 870 /*
871 * Some chips may have other causes of machine check (e.g. SB1 871 * Some chips may have other causes of machine check (e.g. SB1