[PATCH 4/4] initramfs: add missing __user markup

From: Namhyung Kim
Date: Wed Aug 18 2010 - 23:38:31 EST


do_utime(), sys_write() require their arg to be a user pointer but were
missing __user markups. Add it.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
---
init/initramfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 2aa8c96..993ebab 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -109,7 +109,7 @@ static void __init dir_utime(void)
struct dir_entry *de, *tmp;
list_for_each_entry_safe(de, tmp, &dir_list, list) {
list_del(&de->list);
- do_utime(de->name, de->mtime);
+ do_utime((char __user __force *)de->name, de->mtime);
kfree(de->name);
kfree(de);
}
@@ -602,7 +602,7 @@ static int __init populate_rootfs(void)
fd = sys_open((const char __user __force *) "/initrd.image",
O_WRONLY|O_CREAT, 0700);
if (fd >= 0) {
- sys_write(fd, (char *)initrd_start,
+ sys_write(fd, (char __user *)initrd_start,
initrd_end - initrd_start);
sys_close(fd);
free_initrd();
--
1.7.0.4

--
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/