diff options
-rw-r--r-- | fs/exec.c | 10 | ||||
-rw-r--r-- | include/linux/compat.h | 2 |
2 files changed, 4 insertions, 8 deletions
@@ -1575,10 +1575,9 @@ int do_execve(const char *filename, | |||
1575 | } | 1575 | } |
1576 | 1576 | ||
1577 | #ifdef CONFIG_COMPAT | 1577 | #ifdef CONFIG_COMPAT |
1578 | int compat_do_execve(const char *filename, | 1578 | static int compat_do_execve(const char *filename, |
1579 | const compat_uptr_t __user *__argv, | 1579 | const compat_uptr_t __user *__argv, |
1580 | const compat_uptr_t __user *__envp, | 1580 | const compat_uptr_t __user *__envp) |
1581 | struct pt_regs *regs) | ||
1582 | { | 1581 | { |
1583 | struct user_arg_ptr argv = { | 1582 | struct user_arg_ptr argv = { |
1584 | .is_compat = true, | 1583 | .is_compat = true, |
@@ -1588,7 +1587,7 @@ int compat_do_execve(const char *filename, | |||
1588 | .is_compat = true, | 1587 | .is_compat = true, |
1589 | .ptr.compat = __envp, | 1588 | .ptr.compat = __envp, |
1590 | }; | 1589 | }; |
1591 | return do_execve_common(filename, argv, envp, regs); | 1590 | return do_execve_common(filename, argv, envp, current_pt_regs()); |
1592 | } | 1591 | } |
1593 | #endif | 1592 | #endif |
1594 | 1593 | ||
@@ -1682,8 +1681,7 @@ asmlinkage long compat_sys_execve(const char __user * filename, | |||
1682 | struct filename *path = getname(filename); | 1681 | struct filename *path = getname(filename); |
1683 | int error = PTR_ERR(path); | 1682 | int error = PTR_ERR(path); |
1684 | if (!IS_ERR(path)) { | 1683 | if (!IS_ERR(path)) { |
1685 | error = compat_do_execve(path->name, argv, envp, | 1684 | error = compat_do_execve(path->name, argv, envp); |
1686 | current_pt_regs()); | ||
1687 | putname(path); | 1685 | putname(path); |
1688 | } | 1686 | } |
1689 | return error; | 1687 | return error; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index d2db71077d93..784ebfe63c48 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -284,8 +284,6 @@ asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, | |||
284 | const struct compat_iovec __user *vec, | 284 | const struct compat_iovec __user *vec, |
285 | unsigned long vlen, u32 pos_low, u32 pos_high); | 285 | unsigned long vlen, u32 pos_low, u32 pos_high); |
286 | 286 | ||
287 | int compat_do_execve(const char *filename, const compat_uptr_t __user *argv, | ||
288 | const compat_uptr_t __user *envp, struct pt_regs *regs); | ||
289 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, | 287 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, |
290 | const compat_uptr_t __user *envp); | 288 | const compat_uptr_t __user *envp); |
291 | 289 | ||