summaryrefslogtreecommitdiff
path: root/kernel/profile.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-06 20:36:37 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:33 -0800
commit064b022c7adb2d853378078a9dc141f8288d1c73 (patch)
tree67a8a2a05c0acd5eeee569317cf3cd87ff66cabb /kernel/profile.c
parent7116e994b47f3988389be4ceee67dac64b56e0d0 (diff)
downloadlwn-064b022c7adb2d853378078a9dc141f8288d1c73.tar.gz
lwn-064b022c7adb2d853378078a9dc141f8288d1c73.zip
[PATCH] profile: fix uaccess handling
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/profile.c')
-rw-r--r--kernel/profile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/profile.c b/kernel/profile.c
index f940b462eec9..15b012df4ff1 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -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);