Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332968
b: refs/heads/master
c: ab286b2
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Sep 20, 2012
1 parent 67051a3 commit 58815fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cedd6925a0fe355315687427cbe3e63e9633b4d
refs/heads/master: ab286b21aa95c9c46421c59a96bf7745ba2866ca
24 changes: 5 additions & 19 deletions trunk/arch/um/kernel/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,18 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
{
PT_REGS_IP(regs) = eip;
PT_REGS_SP(regs) = esp;
}
EXPORT_SYMBOL(start_thread);

static long execve1(const char *file,
const char __user *const __user *argv,
const char __user *const __user *env)
{
long error;

error = do_execve(file, argv, env, &current->thread.regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
current->ptrace &= ~PT_DTRACE;
#ifdef SUBARCH_EXECVE1
SUBARCH_EXECVE1(&current->thread.regs.regs);
SUBARCH_EXECVE1(regs->regs);
#endif
task_unlock(current);
}
return error;
}
EXPORT_SYMBOL(start_thread);

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

err = execve1(file, argv, env);
err = do_execve(file, argv, env, &current->thread.regs);
if (!err)
UML_LONGJMP(current->thread.exec_buf, 1);
return err;
Expand All @@ -81,7 +67,7 @@ long sys_execve(const char __user *file, const char __user *const __user *argv,
filename = getname(file);
error = PTR_ERR(filename);
if (IS_ERR(filename)) goto out;
error = execve1(filename, argv, env);
error = do_execve(filename, argv, env, &current->thread.regs);
putname(filename);
out:
return error;
Expand Down

0 comments on commit 58815fa

Please sign in to comment.