fix ftrace initialization issue when a module is loaded
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ftrace: fix the race between ftrace and insmodkernel/ | +14 | 0 replies | |
| 1/2 | ftrace: fix the race between ftrace and insmodkernel/ | +13 | 0 replies | |
| 2/2 | module: deal with the failure of complete_formationkernel/ | +5 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] fix ftrace initialization issue when a module is loaded
When a module is loaded, current ftrace initialization around the new module has some issues.
1) ftrace might race with insmod: Just after load_module calls ftrace_module_init to add ftrace records of the module, ftrace_run_update_code might jump in to change module codes. But load_module calls complete_formation=>set_section_ro_nx to put the module TEXT attribute to RO. Then, ftrace_run_update_code triggers ftrace_bug and fails.
2) complete_formation might fail and the module's ftrace records are not cleaned up.
This patchset fixes above issues.