lkml.org 
[lkml]   [2010]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] initramfs: add missing __user markup
Date
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@gmail.com>
---
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


\
 
 \ /
  Last update: 2010-08-19 05:41    [W:0.068 / U:17.592 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site