diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-20 21:53:31 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 21:53:38 -0500 |
commit | 3c456bfc4ba66e9cda210da7bc4fb0ba9fcc6972 (patch) | |
tree | 486f15c6415f5c13ad141d0fbe125495b4400252 | |
parent | 835ab32dff6b437e74c266468b83c4abb69041dc (diff) |
get rid of pt_regs argument of search_binary_handler()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/alpha/kernel/binfmt_loader.c | 2 | ||||
-rw-r--r-- | fs/binfmt_em86.c | 2 | ||||
-rw-r--r-- | fs/binfmt_misc.c | 2 | ||||
-rw-r--r-- | fs/binfmt_script.c | 2 | ||||
-rw-r--r-- | fs/exec.c | 7 | ||||
-rw-r--r-- | include/linux/binfmts.h | 2 |
6 files changed, 8 insertions, 9 deletions
diff --git a/arch/alpha/kernel/binfmt_loader.c b/arch/alpha/kernel/binfmt_loader.c index d1f474d1d44d..54abbef5d077 100644 --- a/arch/alpha/kernel/binfmt_loader.c +++ b/arch/alpha/kernel/binfmt_loader.c | |||
@@ -37,7 +37,7 @@ static int load_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
37 | retval = prepare_binprm(bprm); | 37 | retval = prepare_binprm(bprm); |
38 | if (retval < 0) | 38 | if (retval < 0) |
39 | return retval; | 39 | return retval; |
40 | return search_binary_handler(bprm,regs); | 40 | return search_binary_handler(bprm); |
41 | } | 41 | } |
42 | 42 | ||
43 | static struct linux_binfmt loader_format = { | 43 | static struct linux_binfmt loader_format = { |
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 2790c7e1912e..7e125718a75e 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c | |||
@@ -90,7 +90,7 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) | |||
90 | if (retval < 0) | 90 | if (retval < 0) |
91 | return retval; | 91 | return retval; |
92 | 92 | ||
93 | return search_binary_handler(bprm, regs); | 93 | return search_binary_handler(bprm); |
94 | } | 94 | } |
95 | 95 | ||
96 | static struct linux_binfmt em86_format = { | 96 | static struct linux_binfmt em86_format = { |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 790b3cddca67..226aeac22ac9 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -199,7 +199,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
199 | 199 | ||
200 | bprm->recursion_depth++; | 200 | bprm->recursion_depth++; |
201 | 201 | ||
202 | retval = search_binary_handler (bprm, regs); | 202 | retval = search_binary_handler(bprm); |
203 | if (retval < 0) | 203 | if (retval < 0) |
204 | goto _error; | 204 | goto _error; |
205 | 205 | ||
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index d3b8c1f63155..798b729f01d5 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c | |||
@@ -95,7 +95,7 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) | |||
95 | retval = prepare_binprm(bprm); | 95 | retval = prepare_binprm(bprm); |
96 | if (retval < 0) | 96 | if (retval < 0) |
97 | return retval; | 97 | return retval; |
98 | return search_binary_handler(bprm,regs); | 98 | return search_binary_handler(bprm); |
99 | } | 99 | } |
100 | 100 | ||
101 | static struct linux_binfmt script_format = { | 101 | static struct linux_binfmt script_format = { |
@@ -1349,7 +1349,7 @@ EXPORT_SYMBOL(remove_arg_zero); | |||
1349 | /* | 1349 | /* |
1350 | * cycle the list of binary formats handler, until one recognizes the image | 1350 | * cycle the list of binary formats handler, until one recognizes the image |
1351 | */ | 1351 | */ |
1352 | int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) | 1352 | int search_binary_handler(struct linux_binprm *bprm) |
1353 | { | 1353 | { |
1354 | unsigned int depth = bprm->recursion_depth; | 1354 | unsigned int depth = bprm->recursion_depth; |
1355 | int try,retval; | 1355 | int try,retval; |
@@ -1380,7 +1380,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) | |||
1380 | if (!try_module_get(fmt->module)) | 1380 | if (!try_module_get(fmt->module)) |
1381 | continue; | 1381 | continue; |
1382 | read_unlock(&binfmt_lock); | 1382 | read_unlock(&binfmt_lock); |
1383 | retval = fn(bprm, regs); | 1383 | retval = fn(bprm, current_pt_regs()); |
1384 | /* | 1384 | /* |
1385 | * Restore the depth counter to its starting value | 1385 | * Restore the depth counter to its starting value |
1386 | * in this call, so we don't have to rely on every | 1386 | * in this call, so we don't have to rely on every |
@@ -1447,7 +1447,6 @@ static int do_execve_common(const char *filename, | |||
1447 | bool clear_in_exec; | 1447 | bool clear_in_exec; |
1448 | int retval; | 1448 | int retval; |
1449 | const struct cred *cred = current_cred(); | 1449 | const struct cred *cred = current_cred(); |
1450 | struct pt_regs *regs = current_pt_regs(); | ||
1451 | 1450 | ||
1452 | /* | 1451 | /* |
1453 | * We move the actual failure in case of RLIMIT_NPROC excess from | 1452 | * We move the actual failure in case of RLIMIT_NPROC excess from |
@@ -1524,7 +1523,7 @@ static int do_execve_common(const char *filename, | |||
1524 | if (retval < 0) | 1523 | if (retval < 0) |
1525 | goto out; | 1524 | goto out; |
1526 | 1525 | ||
1527 | retval = search_binary_handler(bprm,regs); | 1526 | retval = search_binary_handler(bprm); |
1528 | if (retval < 0) | 1527 | if (retval < 0) |
1529 | goto out; | 1528 | goto out; |
1530 | 1529 | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index cfcc6bfcaec0..1f6ce133b4c1 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -95,7 +95,7 @@ extern void unregister_binfmt(struct linux_binfmt *); | |||
95 | 95 | ||
96 | extern int prepare_binprm(struct linux_binprm *); | 96 | extern int prepare_binprm(struct linux_binprm *); |
97 | extern int __must_check remove_arg_zero(struct linux_binprm *); | 97 | extern int __must_check remove_arg_zero(struct linux_binprm *); |
98 | extern int search_binary_handler(struct linux_binprm *, struct pt_regs *); | 98 | extern int search_binary_handler(struct linux_binprm *); |
99 | extern int flush_old_exec(struct linux_binprm * bprm); | 99 | extern int flush_old_exec(struct linux_binprm * bprm); |
100 | extern void setup_new_exec(struct linux_binprm * bprm); | 100 | extern void setup_new_exec(struct linux_binprm * bprm); |
101 | extern void would_dump(struct linux_binprm *, struct file *); | 101 | extern void would_dump(struct linux_binprm *, struct file *); |