Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165929
b: refs/heads/master
c: a263f77
h: refs/heads/master
i:
  165927: e7efc7b
v: v3
  • Loading branch information
Rusty Russell committed Sep 24, 2009
1 parent fbd1d3a commit 19fcbc6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d7015caa082d465faeae5d6fd1be077ee6dfa87
refs/heads/master: a263f7763c364015f92e7c097fa46c6673f6fcb0
12 changes: 12 additions & 0 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1797,6 +1797,17 @@ static void setup_modinfo(struct module *mod, Elf_Shdr *sechdrs,
}
}

static void free_modinfo(struct module *mod)
{
struct module_attribute *attr;
int i;

for (i = 0; (attr = modinfo_attrs[i]); i++) {
if (attr->free)
attr->free(mod);
}
}

#ifdef CONFIG_KALLSYMS

/* lookup symbol in given range of kernel_symbols */
Expand Down Expand Up @@ -2506,6 +2517,7 @@ static noinline struct module *load_module(void __user *umod,
synchronize_sched();
module_arch_cleanup(mod);
cleanup:
free_modinfo(mod);
kobject_del(&mod->mkobj.kobj);
kobject_put(&mod->mkobj.kobj);
free_unload:
Expand Down

0 comments on commit 19fcbc6

Please sign in to comment.