Commit 3f069ce5 authored by Linus Torvalds's avatar Linus Torvalds

Annotate namespace system calls (mount, umount, pivot_root etc)

with user pointer annotations.
parent a63df8c1
...@@ -367,7 +367,7 @@ static int do_umount(struct vfsmount *mnt, int flags) ...@@ -367,7 +367,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
* unixes. Our API is identical to OSF/1 to avoid making a mess of AMD * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
*/ */
asmlinkage long sys_umount(char * name, int flags) asmlinkage long sys_umount(char __user * name, int flags)
{ {
struct nameidata nd; struct nameidata nd;
int retval; int retval;
...@@ -396,7 +396,7 @@ asmlinkage long sys_umount(char * name, int flags) ...@@ -396,7 +396,7 @@ asmlinkage long sys_umount(char * name, int flags)
* The 2.0 compatible umount. No flags. * The 2.0 compatible umount. No flags.
*/ */
asmlinkage long sys_oldumount(char * name) asmlinkage long sys_oldumount(char __user * name)
{ {
return sys_umount(name,0); return sys_umount(name,0);
} }
...@@ -664,7 +664,7 @@ static int do_add_mount(struct nameidata *nd, char *type, int flags, ...@@ -664,7 +664,7 @@ static int do_add_mount(struct nameidata *nd, char *type, int flags,
return err; return err;
} }
static int copy_mount_options (const void *data, unsigned long *where) static int copy_mount_options (const void __user *data, unsigned long *where)
{ {
int i; int i;
unsigned long page; unsigned long page;
...@@ -842,8 +842,9 @@ int copy_namespace(int flags, struct task_struct *tsk) ...@@ -842,8 +842,9 @@ int copy_namespace(int flags, struct task_struct *tsk)
return -ENOMEM; return -ENOMEM;
} }
asmlinkage long sys_mount(char * dev_name, char * dir_name, char * type, asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name,
unsigned long flags, void * data) char __user * type, unsigned long flags,
void __user * data)
{ {
int retval; int retval;
unsigned long data_page; unsigned long data_page;
...@@ -963,7 +964,7 @@ static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) ...@@ -963,7 +964,7 @@ static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
* first. * first.
*/ */
asmlinkage long sys_pivot_root(const char *new_root, const char *put_old) asmlinkage long sys_pivot_root(const char __user *new_root, const char __user *put_old)
{ {
struct vfsmount *tmp; struct vfsmount *tmp;
struct nameidata new_nd, old_nd, parent_nd, root_parent, user_nd; struct nameidata new_nd, old_nd, parent_nd, root_parent, user_nd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment