Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169073
b: refs/heads/master
c: 35dead4
h: refs/heads/master
i:
  169071: e4c9836
v: v3
  • Loading branch information
Helge Deller authored and Linus Torvalds committed Dec 2, 2009
1 parent 1828c19 commit e2a23d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: ebd65a5855a1ddb21706e630c9ba1b9e80c767f7
refs/heads/master: 35dead4235e2b67da7275b4122fed37099c2f462
5 changes: 4 additions & 1 deletion trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,

/* Count loaded sections and allocate structures */
for (i = 0; i < nsect; i++)
if (sechdrs[i].sh_flags & SHF_ALLOC)
if (sechdrs[i].sh_flags & SHF_ALLOC
&& sechdrs[i].sh_size)
nloaded++;
size[0] = ALIGN(sizeof(*sect_attrs)
+ nloaded * sizeof(sect_attrs->attrs[0]),
Expand All @@ -1207,6 +1208,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,
for (i = 0; i < nsect; i++) {
if (! (sechdrs[i].sh_flags & SHF_ALLOC))
continue;
if (!sechdrs[i].sh_size)
continue;
sattr->address = sechdrs[i].sh_addr;
sattr->name = kstrdup(secstrings + sechdrs[i].sh_name,
GFP_KERNEL);
Expand Down

0 comments on commit e2a23d8

Please sign in to comment.