Commit c876cb2
kallsyms: Prevent module removal when printing module name and buildid
kallsyms_lookup_buildid() copies the symbol name into the given buffer
so that it can be safely read anytime later. But it just copies pointers
to mod->name and mod->build_id which might get reused after the related
struct module gets removed.
The lifetime of struct module is synchronized using RCU. Take the rcu
read lock for the entire __sprint_symbol().
Reviewed-by: Aaron Tomlin <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>1 parent 176034f commit c876cb2
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
474 | 477 | | |
475 | 478 | | |
476 | 479 | | |
| |||
0 commit comments