diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 07:10:40 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 07:10:40 -0700 |
commit | 8f8b77bfdce811acbcf2248219a7aab5f92de938 (patch) | |
tree | c76c736bdb931d5de55a0de20cd9822d7b48ce8b /arch/alpha/kernel/process.c | |
parent | d602a064f9818819d6c99d99f101bc6b1ae1540d (diff) | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) |
Merge 3.6-rc3 into staging-next
This picks up fixes we want in this branch to allow us to properly test.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/alpha/kernel/process.c')
-rw-r--r-- | arch/alpha/kernel/process.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 153d3fce3e8..d6fde98b74b 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -455,3 +455,22 @@ get_wchan(struct task_struct *p) } return pc; } + +int kernel_execve(const char *path, const char *const argv[], const char *const envp[]) +{ + /* Avoid the HAE being gratuitously wrong, which would cause us + to do the whole turn off interrupts thing and restore it. */ + struct pt_regs regs = {.hae = alpha_mv.hae_cache}; + int err = do_execve(path, argv, envp, ®s); + if (!err) { + struct pt_regs *p = current_pt_regs(); + /* copy regs to normal position and off to userland we go... */ + *p = regs; + __asm__ __volatile__ ( + "mov %0, $sp;" + "br $31, ret_from_sys_call" + : : "r"(p)); + } + return err; +} +EXPORT_SYMBOL(kernel_execve); |