diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-04 19:04:42 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-04 19:04:42 +0200 |
commit | 66cfb32772495068fbb5627b2dc88649ad66c3e5 (patch) | |
tree | 4ce3537afdbd9be92a7a3e6ef4e8e8519ee11543 /fs | |
parent | Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
parent | perf/x86/p4: Add format attributes (diff) | |
download | linux-66cfb32772495068fbb5627b2dc88649ad66c3e5.tar.xz linux-66cfb32772495068fbb5627b2dc88649ad66c3e5.zip |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar.
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/p4: Add format attributes
tracing, sched, vfs: Fix 'old_pid' usage in trace_sched_process_exec()
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/exec.c b/fs/exec.c index 9a1d9f0a60ab..b1fd2025e59a 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1371,7 +1371,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) unsigned int depth = bprm->recursion_depth; int try,retval; struct linux_binfmt *fmt; - pid_t old_pid; + pid_t old_pid, old_vpid; retval = security_bprm_check(bprm); if (retval) @@ -1382,8 +1382,9 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) return retval; /* Need to fetch pid before load_binary changes it */ + old_pid = current->pid; rcu_read_lock(); - old_pid = task_pid_nr_ns(current, task_active_pid_ns(current->parent)); + old_vpid = task_pid_nr_ns(current, task_active_pid_ns(current->parent)); rcu_read_unlock(); retval = -ENOENT; @@ -1406,7 +1407,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) if (retval >= 0) { if (depth == 0) { trace_sched_process_exec(current, old_pid, bprm); - ptrace_event(PTRACE_EVENT_EXEC, old_pid); + ptrace_event(PTRACE_EVENT_EXEC, old_vpid); } put_binfmt(fmt); allow_write_access(bprm->file); |