Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309719
b: refs/heads/master
c: c67e538
h: refs/heads/master
i:
  309717: 289651a
  309715: 244fa4b
  309711: 2f1a8d3
v: v3
  • Loading branch information
H Hartley Sweeten authored and Linus Torvalds committed Jun 1, 2012
1 parent a714331 commit f80a8ae
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 243f3803cf2a3665092c5fd6f924f453694681a6
refs/heads/master: c67e5382fb3f312c95d8d01db40fb398e6da454d
14 changes: 12 additions & 2 deletions trunk/init/do_mounts.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Many of the syscalls used in this file expect some of the arguments
* to be __user pointers not __kernel pointers. To limit the sparse
* noise, turn off sparse checking for this file.
*/
#ifdef __CHECKER__
#undef __CHECKER__
#warning "Sparse checking disabled for this file"
#endif

#include <linux/module.h>
#include <linux/sched.h>
#include <linux/ctype.h>
Expand Down Expand Up @@ -330,7 +340,7 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
if (err)
return err;

sys_chdir((const char __user __force *)"/root");
sys_chdir("/root");
s = current->fs->pwd.dentry->d_sb;
ROOT_DEV = s->s_dev;
printk(KERN_INFO
Expand Down Expand Up @@ -556,5 +566,5 @@ void __init prepare_namespace(void)
out:
devtmpfs_mount("dev");
sys_mount(".", "/", NULL, MS_MOVE, NULL);
sys_chroot((const char __user __force *)".");
sys_chroot(".");
}
10 changes: 10 additions & 0 deletions trunk/init/do_mounts_initrd.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Many of the syscalls used in this file expect some of the arguments
* to be __user pointers not __kernel pointers. To limit the sparse
* noise, turn off sparse checking for this file.
*/
#ifdef __CHECKER__
#undef __CHECKER__
#warning "Sparse checking disabled for this file"
#endif

#include <linux/unistd.h>
#include <linux/kernel.h>
#include <linux/fs.h>
Expand Down
12 changes: 11 additions & 1 deletion trunk/init/do_mounts_md.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Many of the syscalls used in this file expect some of the arguments
* to be __user pointers not __kernel pointers. To limit the sparse
* noise, turn off sparse checking for this file.
*/
#ifdef __CHECKER__
#undef __CHECKER__
#warning "Sparse checking disabled for this file"
#endif

#include <linux/delay.h>
#include <linux/raid/md_u.h>
#include <linux/raid/md_p.h>
Expand Down Expand Up @@ -283,7 +293,7 @@ static void __init autodetect_raid(void)

wait_for_device_probe();

fd = sys_open((const char __user __force *) "/dev/md0", 0, 0);
fd = sys_open("/dev/md0", 0, 0);
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
Expand Down
13 changes: 11 additions & 2 deletions trunk/init/do_mounts_rd.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Many of the syscalls used in this file expect some of the arguments
* to be __user pointers not __kernel pointers. To limit the sparse
* noise, turn off sparse checking for this file.
*/
#ifdef __CHECKER__
#undef __CHECKER__
#warning "Sparse checking disabled for this file"
#endif

#include <linux/kernel.h>
#include <linux/fs.h>
Expand Down Expand Up @@ -181,7 +190,7 @@ int __init rd_load_image(char *from)
char rotator[4] = { '|' , '/' , '-' , '\\' };
#endif

out_fd = sys_open((const char __user __force *) "/dev/ram", O_RDWR, 0);
out_fd = sys_open("/dev/ram", O_RDWR, 0);
if (out_fd < 0)
goto out;

Expand Down Expand Up @@ -280,7 +289,7 @@ int __init rd_load_image(char *from)
sys_close(out_fd);
out:
kfree(buf);
sys_unlink((const char __user __force *) "/dev/ram");
sys_unlink("/dev/ram");
return res;
}

Expand Down
16 changes: 13 additions & 3 deletions trunk/init/initramfs.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* Many of the syscalls used in this file expect some of the arguments
* to be __user pointers not __kernel pointers. To limit the sparse
* noise, turn off sparse checking for this file.
*/
#ifdef __CHECKER__
#undef __CHECKER__
#warning "Sparse checking disabled for this file"
#endif

#include <linux/init.h>
#include <linux/fs.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -74,7 +84,7 @@ static void __init free_hash(void)
}
}

static long __init do_utime(char __user *filename, time_t mtime)
static long __init do_utime(char *filename, time_t mtime)
{
struct timespec t[2];

Expand Down Expand Up @@ -529,7 +539,7 @@ static void __init clean_rootfs(void)
struct linux_dirent64 *dirp;
int num;

fd = sys_open((const char __user __force *) "/", O_RDONLY, 0);
fd = sys_open("/", O_RDONLY, 0);
WARN_ON(fd < 0);
if (fd < 0)
return;
Expand Down Expand Up @@ -589,7 +599,7 @@ static int __init populate_rootfs(void)
}
printk(KERN_INFO "rootfs image is not initramfs (%s)"
"; looks like an initrd\n", err);
fd = sys_open((const char __user __force *) "/initrd.image",
fd = sys_open("/initrd.image",
O_WRONLY|O_CREAT, 0700);
if (fd >= 0) {
sys_write(fd, (char *)initrd_start,
Expand Down

0 comments on commit f80a8ae

Please sign in to comment.