Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157158
b: refs/heads/master
c: ea6bff3
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Aug 29, 2009
1 parent 8504367 commit 81e4d5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 4ed86af67e04cb5eb93faba589d102726207865a
refs/heads/master: ea6bff368548d79529421a9dc0710fc5330eb504
7 changes: 5 additions & 2 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,10 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect,
struct module_notes_attrs *notes_attrs;
struct bin_attribute *nattr;

/* failed to create section attributes, so can't create notes */
if (!mod->sect_attrs)
return;

/* Count notes sections and allocate structures. */
notes = 0;
for (i = 0; i < nsect; i++)
Expand Down Expand Up @@ -2355,8 +2359,7 @@ static noinline struct module *load_module(void __user *umod,
if (err < 0)
goto unlink;
add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
if (mod->sect_attrs)
add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);

/* Get rid of temporary copy */
vfree(hdr);
Expand Down

0 comments on commit 81e4d5b

Please sign in to comment.