aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index c3d517bfdd27..b08367abf30e 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1358,6 +1358,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;
retval = security_bprm_check(bprm);
if (retval)
@@ -1371,6 +1372,11 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
if (retval)
return retval;
+ /* Need to fetch pid before load_binary changes it */
+ rcu_read_lock();
+ old_pid = task_pid_nr_ns(current, task_active_pid_ns(current->parent));
+ rcu_read_unlock();
+
retval = -ENOENT;
for (try=0; try<2; try++) {
read_lock(&binfmt_lock);
@@ -1390,7 +1396,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
bprm->recursion_depth = depth;
if (retval >= 0) {
if (depth == 0)
- ptrace_event(PTRACE_EVENT_EXEC, 0);
+ ptrace_event(PTRACE_EVENT_EXEC,
+ old_pid);
put_binfmt(fmt);
allow_write_access(bprm->file);
if (bprm->file)
05mfd: abx500: Move the AB8500 Kconfig fragmentLinus Walleij1-7/+7 2013-04-05mfd: davinci_voicecodec: use module_platform_driver_probe()Jingoo Han1-11/+1 2013-04-05mfd: htc-pasic3: use module_platform_driver_probe()Jingoo Han1-12/+1 2013-04-05mfd: ab3100-otp: use module_platform_driver_probe()Jingoo Han1-13/+1 2013-04-05mfd: stmpe: DT: Add stmpe-i2c dt alias to get id deviceGabriel Fernandez1-1/+4 2013-04-05mfd: stmpe: DT: Enable no-irq mode configurationGabriel Fernandez1-0/+3 2013-04-05mfd: syscon: Add non-DT supportAlexander Shiyan3-31/+46 2013-04-05mfd: syscon: Removed unneeded field "dev" from private driver structureAlexander Shiyan1-4/+1 2013-04-05mfd: palmas: Change the DT node property names to follow the conventionJ Keerthy1-3/+3 2013-04-05mfd: as3711: Add OF supportGuennadi Liakhovetski2-4/+96 2013-04-05mfd: cros_ec: Add MFD_CORE dependencyDavid Rientjes1-0/+1 2013-04-05mfd: cros_ec_spi: Warnings fixSamuel Ortiz1-3/+3 2013-04-05mfd: cros_ec: Export needed symbols for the i2c and spi modulesSamuel Ortiz1-0/+7 2013-04-05input: Add ChromeOS EC keyboard driverSimon Glass4-0/+419 2013-04-05input: matrix-keymap: Add function to read the new DT bindingSimon Glass5-18/+54 2013-04-05mfd: Add ChromeOS EC SPI driverSimon Glass3-0/+386 2013-04-05mfd: Add ChromeOS EC I2C driverSimon Glass3-0/+212 2013-04-05mfd: Add ChromeOS EC implementationSimon Glass5-0/+424