Commit 064b022c7adb2d853378078a9dc141f8288d1c73

Authored by Heiko Carstens
Committed by Linus Torvalds
1 parent 7116e994b4

[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

... ... @@ -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);