]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Apr 2012 17:04:42 +0000 (10:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Apr 2012 17:04:42 +0000 (10:04 -0700)
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()

1  2 
fs/exec.c

diff --combined fs/exec.c
index 9a1d9f0a60abf77a55df5bef051047a23ef853d0,644f6c4eb606056b931fdaed3a0dc7ff8f5d712d..b1fd2025e59a1e0ea0a2f475b812987dac176e9f
+++ b/fs/exec.c
@@@ -59,7 -59,6 +59,7 @@@
  #include <asm/uaccess.h>
  #include <asm/mmu_context.h>
  #include <asm/tlb.h>
 +#include <asm/exec.h>
  
  #include <trace/events/task.h>
  #include "internal.h"
@@@ -1028,10 -1027,10 +1028,10 @@@ static void flush_old_files(struct file
                fdt = files_fdtable(files);
                if (i >= fdt->max_fds)
                        break;
 -              set = fdt->close_on_exec->fds_bits[j];
 +              set = fdt->close_on_exec[j];
                if (!set)
                        continue;
 -              fdt->close_on_exec->fds_bits[j] = 0;
 +              fdt->close_on_exec[j] = 0;
                spin_unlock(&files->file_lock);
                for ( ; set ; i++,set >>= 1) {
                        if (set & 1) {
@@@ -1371,7 -1370,7 +1371,7 @@@ int search_binary_handler(struct linux_
        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)
                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;
                        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);
@@@ -2067,8 -2067,8 +2068,8 @@@ static int umh_pipe_setup(struct subpro
        fd_install(0, rp);
        spin_lock(&cf->file_lock);
        fdt = files_fdtable(cf);
 -      FD_SET(0, fdt->open_fds);
 -      FD_CLR(0, fdt->close_on_exec);
 +      __set_open_fd(0, fdt);
 +      __clear_close_on_exec(0, fdt);
        spin_unlock(&cf->file_lock);
  
        /* and disallow core files too */