diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-12-12 11:59:39 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 11:59:39 +0100 |
| commit | fd10902797fc9d6abaf55d9c2e3c6698c90b10c7 (patch) | |
| tree | 0bc15b8b967e6f0973387e7c81f5b0dc9ce44e75 /fs/exec.c | |
| parent | 5b3eec0c80038c8739ccd465b897a35c0dff1cc4 (diff) | |
| parent | 8b1fae4e4200388b64dd88065639413cb3f1051c (diff) | |
Merge commit 'v2.6.28-rc8' into x86/irq
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index 4e834f16d9da..ec5df9a38313 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1159,6 +1159,7 @@ EXPORT_SYMBOL(remove_arg_zero); */ 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; #ifdef __alpha__ @@ -1219,8 +1220,15 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) continue; read_unlock(&binfmt_lock); retval = fn(bprm, regs); + /* + * Restore the depth counter to its starting value + * in this call, so we don't have to rely on every + * load_binary function to restore it on return. + */ + bprm->recursion_depth = depth; if (retval >= 0) { - tracehook_report_exec(fmt, bprm, regs); + if (depth == 0) + tracehook_report_exec(fmt, bprm, regs); put_binfmt(fmt); allow_write_access(bprm->file); if (bprm->file) |
