[patch 4/5] profile: fix uaccess handling

From: Heiko Carstens
Date: Thu Oct 26 2006 - 09:04:30 EST


Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
kernel/profile.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/profile.c
===================================================================
--- linux-2.6.orig/kernel/profile.c 2006-10-26 14:40:57.000000000 +0200
+++ linux-2.6/kernel/profile.c 2006-10-26 14:42:07.000000000 +0200
@@ -442,7 +442,8 @@
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/