Skip to content

Commit

Permalink
[CVE-2009-0029] System call wrappers part 14
Browse files Browse the repository at this point in the history
Signed-off-by: Heiko Carstens <[email protected]>
  • Loading branch information
heicarst committed Jan 14, 2009
1 parent 6a6160a commit 3480b25
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@ asmlinkage long sys_mknodat(int dfd, const char __user *filename, int mode,
return error;
}

asmlinkage long sys_mknod(const char __user *filename, int mode, unsigned dev)
SYSCALL_DEFINE3(mknod, const char __user *, filename, int, mode, unsigned, dev)
{
return sys_mknodat(AT_FDCWD, filename, mode, dev);
}
Expand Down Expand Up @@ -2302,7 +2302,7 @@ asmlinkage long sys_unlinkat(int dfd, const char __user *pathname, int flag)
return do_unlinkat(dfd, pathname);
}

asmlinkage long sys_unlink(const char __user *pathname)
SYSCALL_DEFINE1(unlink, const char __user *, pathname)
{
return do_unlinkat(AT_FDCWD, pathname);
}
Expand Down Expand Up @@ -2370,7 +2370,7 @@ asmlinkage long sys_symlinkat(const char __user *oldname,
return error;
}

asmlinkage long sys_symlink(const char __user *oldname, const char __user *newname)
SYSCALL_DEFINE2(symlink, const char __user *, oldname, const char __user *, newname)
{
return sys_symlinkat(oldname, AT_FDCWD, newname);
}
Expand Down Expand Up @@ -2473,7 +2473,7 @@ asmlinkage long sys_linkat(int olddfd, const char __user *oldname,
return error;
}

asmlinkage long sys_link(const char __user *oldname, const char __user *newname)
SYSCALL_DEFINE2(link, const char __user *, oldname, const char __user *, newname)
{
return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
}
Expand Down
4 changes: 2 additions & 2 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2171,8 +2171,8 @@ static void chroot_fs_refs(struct path *old_root, struct path *new_root)
* though, so you may need to say mount --bind /nfs/my_root /nfs/my_root
* first.
*/
asmlinkage long sys_pivot_root(const char __user * new_root,
const char __user * put_old)
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
const char __user *, put_old)
{
struct vfsmount *tmp;
struct path new, old, parent_path, root_parent, root;
Expand Down
2 changes: 1 addition & 1 deletion fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ asmlinkage long sys_fchdir(unsigned int fd)
return error;
}

asmlinkage long sys_chroot(const char __user * filename)
SYSCALL_DEFINE1(chroot, const char __user *, filename)
{
struct path path;
int error;
Expand Down
2 changes: 1 addition & 1 deletion mm/madvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ madvise_vma(struct vm_area_struct *vma, struct vm_area_struct **prev,
* -EBADF - map exists, but area maps something that isn't a file.
* -EAGAIN - a kernel resource was temporarily unavailable.
*/
asmlinkage long sys_madvise(unsigned long start, size_t len_in, int behavior)
SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
{
unsigned long end, tmp;
struct vm_area_struct * vma, *prev;
Expand Down
4 changes: 2 additions & 2 deletions mm/mincore.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ static long do_mincore(unsigned long addr, unsigned char *vec, unsigned long pag
* mapped
* -EAGAIN - A kernel resource was temporarily unavailable.
*/
asmlinkage long sys_mincore(unsigned long start, size_t len,
unsigned char __user * vec)
SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len,
unsigned char __user *, vec)
{
long retval;
unsigned long pages;
Expand Down
4 changes: 2 additions & 2 deletions mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ static int do_mlockall(int flags)
return 0;
}

asmlinkage long sys_mlockall(int flags)
SYSCALL_DEFINE1(mlockall, int, flags)
{
unsigned long lock_limit;
int ret = -EINVAL;
Expand Down Expand Up @@ -623,7 +623,7 @@ asmlinkage long sys_mlockall(int flags)
return ret;
}

asmlinkage long sys_munlockall(void)
SYSCALL_DEFINE0(munlockall)
{
int ret;

Expand Down

0 comments on commit 3480b25

Please sign in to comment.