Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140525
b: refs/heads/master
c: e91defa
h: refs/heads/master
i:
  140523: 4a3150a
v: v3
  • Loading branch information
Rusty Russell committed Mar 31, 2009
1 parent bebd89a commit c3349e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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: acae05156551fd7528fbb616271e672789388e3c
refs/heads/master: e91defa26c527ceeaff6266c55cdc7e17c9081a2
12 changes: 3 additions & 9 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1912,12 +1912,6 @@ static noinline struct module *load_module(void __user *umod,
if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL)
return ERR_PTR(-ENOMEM);

/* Create stop_machine threads since the error path relies on
* a non-failing stop_machine call. */
err = stop_machine_create();
if (err)
goto free_hdr;

if (copy_from_user(hdr, umod, len) != 0) {
err = -EFAULT;
goto free_hdr;
Expand Down Expand Up @@ -2303,12 +2297,13 @@ static noinline struct module *load_module(void __user *umod,
/* Get rid of temporary copy */
vfree(hdr);

stop_machine_destroy();
/* Done! */
return mod;

unlink:
stop_machine(__unlink_module, mod, NULL);
/* Unlink carefully: kallsyms could be walking list. */
list_del_rcu(&mod->list);
synchronize_sched();
module_arch_cleanup(mod);
cleanup:
kobject_del(&mod->mkobj.kobj);
Expand All @@ -2331,7 +2326,6 @@ static noinline struct module *load_module(void __user *umod,
kfree(args);
free_hdr:
vfree(hdr);
stop_machine_destroy();
return ERR_PTR(err);

truncated:
Expand Down

0 comments on commit c3349e1

Please sign in to comment.