From: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton --- kernel/profile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN kernel/profile.c~profile-fix-uaccess-handling kernel/profile.c --- a/kernel/profile.c~profile-fix-uaccess-handling +++ a/kernel/profile.c @@ -442,7 +442,8 @@ read_profile(struct file *file, char __u 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); _