From 8d352a2fdbfd937f0809aff2b8b8dec55b966570 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 20 Oct 2012 21:53:31 -0400 Subject: [PATCH] --- yaml --- r: 340327 b: refs/heads/master c: 3c456bfc4ba66e9cda210da7bc4fb0ba9fcc6972 h: refs/heads/master i: 340325: 845537ba6ff89f27326aff80f3d22257068f2c7a 340323: d86fa109d6f602f64b87c0d23fccb9078b44e800 340319: bd45fc2640d6a8e4f0fc5b3bce2454a0c3134f08 v: v3 --- [refs] | 2 +- trunk/arch/alpha/kernel/binfmt_loader.c | 2 +- trunk/fs/binfmt_em86.c | 2 +- trunk/fs/binfmt_misc.c | 2 +- trunk/fs/binfmt_script.c | 2 +- trunk/fs/exec.c | 7 +++---- trunk/include/linux/binfmts.h | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 461e3b1bf426..1c5674dceec2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 835ab32dff6b437e74c266468b83c4abb69041dc +refs/heads/master: 3c456bfc4ba66e9cda210da7bc4fb0ba9fcc6972 diff --git a/trunk/arch/alpha/kernel/binfmt_loader.c b/trunk/arch/alpha/kernel/binfmt_loader.c index d1f474d1d44d..54abbef5d077 100644 --- a/trunk/arch/alpha/kernel/binfmt_loader.c +++ b/trunk/arch/alpha/kernel/binfmt_loader.c @@ -37,7 +37,7 @@ static int load_binary(struct linux_binprm *bprm, struct pt_regs *regs) retval = prepare_binprm(bprm); if (retval < 0) return retval; - return search_binary_handler(bprm,regs); + return search_binary_handler(bprm); } static struct linux_binfmt loader_format = { diff --git a/trunk/fs/binfmt_em86.c b/trunk/fs/binfmt_em86.c index 2790c7e1912e..7e125718a75e 100644 --- a/trunk/fs/binfmt_em86.c +++ b/trunk/fs/binfmt_em86.c @@ -90,7 +90,7 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) if (retval < 0) return retval; - return search_binary_handler(bprm, regs); + return search_binary_handler(bprm); } static struct linux_binfmt em86_format = { diff --git a/trunk/fs/binfmt_misc.c b/trunk/fs/binfmt_misc.c index 790b3cddca67..226aeac22ac9 100644 --- a/trunk/fs/binfmt_misc.c +++ b/trunk/fs/binfmt_misc.c @@ -199,7 +199,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) bprm->recursion_depth++; - retval = search_binary_handler (bprm, regs); + retval = search_binary_handler(bprm); if (retval < 0) goto _error; diff --git a/trunk/fs/binfmt_script.c b/trunk/fs/binfmt_script.c index d3b8c1f63155..798b729f01d5 100644 --- a/trunk/fs/binfmt_script.c +++ b/trunk/fs/binfmt_script.c @@ -95,7 +95,7 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) retval = prepare_binprm(bprm); if (retval < 0) return retval; - return search_binary_handler(bprm,regs); + return search_binary_handler(bprm); } static struct linux_binfmt script_format = { diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index dc5e2830d353..2aee7ef10663 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1349,7 +1349,7 @@ EXPORT_SYMBOL(remove_arg_zero); /* * cycle the list of binary formats handler, until one recognizes the image */ -int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) +int search_binary_handler(struct linux_binprm *bprm) { unsigned int depth = bprm->recursion_depth; int try,retval; @@ -1380,7 +1380,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) if (!try_module_get(fmt->module)) continue; read_unlock(&binfmt_lock); - retval = fn(bprm, regs); + retval = fn(bprm, current_pt_regs()); /* * Restore the depth counter to its starting value * in this call, so we don't have to rely on every @@ -1447,7 +1447,6 @@ static int do_execve_common(const char *filename, bool clear_in_exec; int retval; const struct cred *cred = current_cred(); - struct pt_regs *regs = current_pt_regs(); /* * We move the actual failure in case of RLIMIT_NPROC excess from @@ -1524,7 +1523,7 @@ static int do_execve_common(const char *filename, if (retval < 0) goto out; - retval = search_binary_handler(bprm,regs); + retval = search_binary_handler(bprm); if (retval < 0) goto out; diff --git a/trunk/include/linux/binfmts.h b/trunk/include/linux/binfmts.h index cfcc6bfcaec0..1f6ce133b4c1 100644 --- a/trunk/include/linux/binfmts.h +++ b/trunk/include/linux/binfmts.h @@ -95,7 +95,7 @@ extern void unregister_binfmt(struct linux_binfmt *); extern int prepare_binprm(struct linux_binprm *); extern int __must_check remove_arg_zero(struct linux_binprm *); -extern int search_binary_handler(struct linux_binprm *, struct pt_regs *); +extern int search_binary_handler(struct linux_binprm *); extern int flush_old_exec(struct linux_binprm * bprm); extern void setup_new_exec(struct linux_binprm * bprm); extern void would_dump(struct linux_binprm *, struct file *);