Skip to content

Commit 4addd26

Browse files
minchanhoAl Viro
authored andcommitted
exec: make prepare_bprm_creds static
prepare_bprm_creds is not used outside exec.c, so there's no reason for it to have external linkage. Signed-off-by: Chanho Min <chanho.min@lge.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 22cb740 commit 4addd26

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/exec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ EXPORT_SYMBOL(finalize_exec);
13991399
* Or, if exec fails before, free_bprm() should release ->cred and
14001400
* and unlock.
14011401
*/
1402-
int prepare_bprm_creds(struct linux_binprm *bprm)
1402+
static int prepare_bprm_creds(struct linux_binprm *bprm)
14031403
{
14041404
if (mutex_lock_interruptible(&current->signal->cred_guard_mutex))
14051405
return -ERESTARTNOINTR;

‎include/linux/binfmts.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ extern int transfer_args_to_stack(struct linux_binprm *bprm,
138138
extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
139139
extern int copy_strings_kernel(int argc, const char *const *argv,
140140
struct linux_binprm *bprm);
141-
extern int prepare_bprm_creds(struct linux_binprm *bprm);
142141
extern void install_exec_creds(struct linux_binprm *bprm);
143142
extern void set_binfmt(struct linux_binfmt *new);
144143
extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t);

0 commit comments

Comments
 (0)