aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/ptrace.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 06981a8b271b..ea7ce0215cd1 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -565,6 +565,8 @@ int ptrace_request(struct task_struct *child, long request,
565{ 565{
566 int ret = -EIO; 566 int ret = -EIO;
567 siginfo_t siginfo; 567 siginfo_t siginfo;
568 void __user *datavp = (void __user *) data;
569 unsigned long __user *datalp = datavp;
568 570
569 switch (request) { 571 switch (request) {
570 case PTRACE_PEEKTEXT: 572 case PTRACE_PEEKTEXT:
@@ -581,19 +583,17 @@ int ptrace_request(struct task_struct *child, long request,
581 ret = ptrace_setoptions(child, data); 583 ret = ptrace_setoptions(child, data);
582 break; 584 break;
583 case PTRACE_GETEVENTMSG: 585 case PTRACE_GETEVENTMSG:
584 ret = put_user(child->ptrace_message, (unsigned long __user *) data); 586 ret = put_user(child->ptrace_message, datalp);
585 break; 587 break;
586 588
587 case PTRACE_GETSIGINFO: 589 case PTRACE_GETSIGINFO:
588 ret = ptrace_getsiginfo(child, &siginfo); 590 ret = ptrace_getsiginfo(child, &siginfo);
589 if (!ret) 591 if (!ret)
590 ret = copy_siginfo_to_user((siginfo_t __user *) data, 592 ret = copy_siginfo_to_user(datavp, &siginfo);
591 &siginfo);
592 break; 593 break;
593 594
594 case PTRACE_SETSIGINFO: 595 case PTRACE_SETSIGINFO:
595 if (copy_from_user(&siginfo, (siginfo_t __user *) data, 596 if (copy_from_user(&siginfo, datavp, sizeof siginfo))
596 sizeof siginfo))
597 ret = -EFAULT; 597 ret = -EFAULT;
598 else 598 else
599 ret = ptrace_setsiginfo(child, &siginfo); 599 ret = ptrace_setsiginfo(child, &siginfo);
@@ -624,7 +624,7 @@ int ptrace_request(struct task_struct *child, long request,
624 } 624 }
625 mmput(mm); 625 mmput(mm);
626 626
627 ret = put_user(tmp, (unsigned long __user *) data); 627 ret = put_user(tmp, datalp);
628 break; 628 break;
629 } 629 }
630#endif 630#endif
@@ -653,7 +653,7 @@ int ptrace_request(struct task_struct *child, long request,
653 case PTRACE_SETREGSET: 653 case PTRACE_SETREGSET:
654 { 654 {
655 struct iovec kiov; 655 struct iovec kiov;
656 struct iovec __user *uiov = (struct iovec __user *) data; 656 struct iovec __user *uiov = datavp;
657 657
658 if (!access_ok(VERIFY_WRITE, uiov, sizeof(*uiov))) 658 if (!access_ok(VERIFY_WRITE, uiov, sizeof(*uiov)))
659 return -EFAULT; 659 return -EFAULT;