diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2009-12-22 19:21:47 -0500 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2009-12-22 19:21:47 -0500 |
| commit | f80ca163d65903276bec7045a484a79c0897eb2d (patch) | |
| tree | 97c7d61d43248b9db0757a76af80ff58b98b5599 /kernel/module.c | |
| parent | 0794ec8ce327ec74416b569b8fb1951274693700 (diff) | |
| parent | a6d52d70677e99bdb89b6921c265d0a58c22e597 (diff) | |
Merge branch 'ioat' into fixes
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index 8b7d8805819d..5842a71cf052 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -1187,7 +1187,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect, | |||
| 1187 | 1187 | ||
| 1188 | /* Count loaded sections and allocate structures */ | 1188 | /* Count loaded sections and allocate structures */ |
| 1189 | for (i = 0; i < nsect; i++) | 1189 | for (i = 0; i < nsect; i++) |
| 1190 | if (sechdrs[i].sh_flags & SHF_ALLOC) | 1190 | if (sechdrs[i].sh_flags & SHF_ALLOC |
| 1191 | && sechdrs[i].sh_size) | ||
| 1191 | nloaded++; | 1192 | nloaded++; |
| 1192 | size[0] = ALIGN(sizeof(*sect_attrs) | 1193 | size[0] = ALIGN(sizeof(*sect_attrs) |
| 1193 | + nloaded * sizeof(sect_attrs->attrs[0]), | 1194 | + nloaded * sizeof(sect_attrs->attrs[0]), |
| @@ -1207,6 +1208,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect, | |||
| 1207 | for (i = 0; i < nsect; i++) { | 1208 | for (i = 0; i < nsect; i++) { |
| 1208 | if (! (sechdrs[i].sh_flags & SHF_ALLOC)) | 1209 | if (! (sechdrs[i].sh_flags & SHF_ALLOC)) |
| 1209 | continue; | 1210 | continue; |
| 1211 | if (!sechdrs[i].sh_size) | ||
| 1212 | continue; | ||
| 1210 | sattr->address = sechdrs[i].sh_addr; | 1213 | sattr->address = sechdrs[i].sh_addr; |
| 1211 | sattr->name = kstrdup(secstrings + sechdrs[i].sh_name, | 1214 | sattr->name = kstrdup(secstrings + sechdrs[i].sh_name, |
| 1212 | GFP_KERNEL); | 1215 | GFP_KERNEL); |
