Repository navigation
Commit 59ef28b
committed
module: fix out-by-one error in kallsyms
Masaki found and patched a kallsyms issue: the last symbol in a
module's symtab wasn't transferred. This is because we manually copy
the zero'th entry (which is always empty) then copy the rest in a loop
starting at 1, though from src[0]. His fix was minimal, I prefer to
rewrite the loops in more standard form.
There are two loops: one to get the size, and one to copy. Make these
identical: always count entry 0 and any defined symbol in an allocated
non-init section.
This bug exists since the following commit was introduced.
module: reduce symbol table for loaded modules (v2)
commit: 4a49622
LKML: http://lkml.org/lkml/2012/10/24/27
Reported-by: Masaki Kimura <masaki.kimura.kz@hitachi.com>
Cc: stable@kernel.org1 parent bc90942 commit 59ef28b
1 file changed
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2293 | 2293 | | |
2294 | 2294 | | |
2295 | 2295 | | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
2296 | 2299 | | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
2300 | 2304 | | |
2301 | 2305 | | |
| 2306 | + | |
2302 | 2307 | | |
2303 | 2308 | | |
2304 | 2309 | | |
| |||
2332 | 2337 | | |
2333 | 2338 | | |
2334 | 2339 | | |
2335 | | - | |
2336 | 2340 | | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
2341 | | - | |
2342 | | - | |
2343 | | - | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
2344 | 2349 | | |
2345 | 2350 | | |
2346 | 2351 | | |
| |||
0 commit comments