Commit 064b022c7adb2d853378078a9dc141f8288d1c73
Committed by
Linus Torvalds
1 parent
7116e994b4
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
kernel/profile.c
... | ... | @@ -442,7 +442,8 @@ |
442 | 442 | read = 0; |
443 | 443 | |
444 | 444 | while (p < sizeof(unsigned int) && count > 0) { |
445 | - put_user(*((char *)(&sample_step)+p),buf); | |
445 | + if (put_user(*((char *)(&sample_step)+p),buf)) | |
446 | + return -EFAULT; | |
446 | 447 | buf++; p++; count--; read++; |
447 | 448 | } |
448 | 449 | pnt = (char *)prof_buffer + p - sizeof(atomic_t); |