From: Heiko Carstens Date: Thu, 7 Dec 2006 04:36:37 +0000 (-0800) Subject: [PATCH] profile: fix uaccess handling X-Git-Tag: v2.6.20-rc1~15^2~14^2~204 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=064b022c7adb2d853378078a9dc141f8288d1c73;p=platform%2Fkernel%2Flinux-exynos.git [PATCH] profile: fix uaccess handling Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/profile.c b/kernel/profile.c index f940b46..15b012df 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);