Skip to content

Commit

Permalink
uml: fix compile warning
Browse files Browse the repository at this point in the history
This fixes:
incompatible pointer type:  => 89
       arch/um/kernel/exec.c: warning: passing argument 2 of 'execve1' from
incompatible pointer type:  => 69, 85
       arch/um/kernel/exec.c: warning: passing argument 3 of 'execve1' from
incompatible pointer type:  => 69, 85

which was introduced by d762746 ("Make do_execve() take a const
filename pointer")

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Richard Weinberger authored and Linus Torvalds committed Sep 23, 2010
1 parent 1c2499a commit cb1dcc0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions arch/um/kernel/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static long execve1(const char *file,
return error;
}

long um_execve(const char *file, char __user *__user *argv, char __user *__user *env)
long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env)
{
long err;

Expand All @@ -72,8 +72,8 @@ long um_execve(const char *file, char __user *__user *argv, char __user *__user
return err;
}

long sys_execve(const char __user *file, char __user *__user *argv,
char __user *__user *env)
long sys_execve(const char __user *file, const char __user *const __user *argv,
const char __user *const __user *env)
{
long error;
char *filename;
Expand Down
2 changes: 1 addition & 1 deletion arch/um/kernel/internal.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extern long um_execve(const char *file, char __user *__user *argv, char __user *__user *env);
extern long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env);
4 changes: 2 additions & 2 deletions arch/um/kernel/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ int kernel_execve(const char *filename,

fs = get_fs();
set_fs(KERNEL_DS);
ret = um_execve(filename, (char __user *__user *)argv,
(char __user *__user *) envp);
ret = um_execve(filename, (const char __user *const __user *)argv,
(const char __user *const __user *) envp);
set_fs(fs);

return ret;
Expand Down

0 comments on commit cb1dcc0

Please sign in to comment.