Skip to content

Commit

Permalink
[PATCH] profile: fix uaccess handling
Browse files Browse the repository at this point in the history
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
heicarst authored and Linus Torvalds committed Dec 7, 2006
1 parent 7116e99 commit 064b022
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
read = 0;

while (p < sizeof(unsigned int) && count > 0) {
put_user(*((char *)(&sample_step)+p),buf);
if (put_user(*((char *)(&sample_step)+p),buf))
return -EFAULT;
buf++; p++; count--; read++;
}
pnt = (char *)prof_buffer + p - sizeof(atomic_t);
Expand Down

0 comments on commit 064b022

Please sign in to comment.