Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165685
b: refs/heads/master
c: 964ee7d
h: refs/heads/master
i:
  165683: b97ae8e
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Sep 24, 2009
1 parent 25fba1b commit b6f1ef8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61be228a06dc6e8662f30e89eda3c12083c1f379
refs/heads/master: 964ee7df90d799e38fb1556c57cd5c45fc736436
14 changes: 5 additions & 9 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,18 +1395,14 @@ int do_execve(char * filename,
return retval;
}

int set_binfmt(struct linux_binfmt *new)
void set_binfmt(struct linux_binfmt *new)
{
struct linux_binfmt *old = current->binfmt;
if (current->binfmt)
module_put(current->binfmt->module);

if (new) {
if (!try_module_get(new->module))
return -1;
}
current->binfmt = new;
if (old)
module_put(old->module);
return 0;
if (new)
__module_get(new->module);
}

EXPORT_SYMBOL(set_binfmt);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/binfmts.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
extern int prepare_bprm_creds(struct linux_binprm *bprm);
extern void install_exec_creds(struct linux_binprm *bprm);
extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
extern int set_binfmt(struct linux_binfmt *new);
extern void set_binfmt(struct linux_binfmt *new);
extern void free_bprm(struct linux_binprm *);

#endif /* __KERNEL__ */
Expand Down

0 comments on commit b6f1ef8

Please sign in to comment.