Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218538
b: refs/heads/master
c: 9fed81d
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Linus Torvalds committed Oct 28, 2010
1 parent 21d7ecc commit 2adf66c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4abf986960ecda6a87fc2f795aacf888a2f0127e
refs/heads/master: 9fed81dc40f5a1ac2783bcc78d4029873be72894
14 changes: 7 additions & 7 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ int ptrace_request(struct task_struct *child, long request,
{
int ret = -EIO;
siginfo_t siginfo;
void __user *datavp = (void __user *) data;
unsigned long __user *datalp = datavp;

switch (request) {
case PTRACE_PEEKTEXT:
Expand All @@ -581,19 +583,17 @@ int ptrace_request(struct task_struct *child, long request,
ret = ptrace_setoptions(child, data);
break;
case PTRACE_GETEVENTMSG:
ret = put_user(child->ptrace_message, (unsigned long __user *) data);
ret = put_user(child->ptrace_message, datalp);
break;

case PTRACE_GETSIGINFO:
ret = ptrace_getsiginfo(child, &siginfo);
if (!ret)
ret = copy_siginfo_to_user((siginfo_t __user *) data,
&siginfo);
ret = copy_siginfo_to_user(datavp, &siginfo);
break;

case PTRACE_SETSIGINFO:
if (copy_from_user(&siginfo, (siginfo_t __user *) data,
sizeof siginfo))
if (copy_from_user(&siginfo, datavp, sizeof siginfo))
ret = -EFAULT;
else
ret = ptrace_setsiginfo(child, &siginfo);
Expand Down Expand Up @@ -624,7 +624,7 @@ int ptrace_request(struct task_struct *child, long request,
}
mmput(mm);

ret = put_user(tmp, (unsigned long __user *) data);
ret = put_user(tmp, datalp);
break;
}
#endif
Expand Down Expand Up @@ -653,7 +653,7 @@ int ptrace_request(struct task_struct *child, long request,
case PTRACE_SETREGSET:
{
struct iovec kiov;
struct iovec __user *uiov = (struct iovec __user *) data;
struct iovec __user *uiov = datavp;

if (!access_ok(VERIFY_WRITE, uiov, sizeof(*uiov)))
return -EFAULT;
Expand Down

0 comments on commit 2adf66c

Please sign in to comment.