kobject: avoid to cleanup kobject after module is unloaded
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 9 repliesIn review
- v12 patches 12 repliesSuperseded
Changes in v2 from the cover letter
- add comment on 1st patch, suggested by Greg, 1/2
- fix build failure in case that CONFIG_MODULE is disabled, and add comment in kobj_module_callback(), 2/2
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | kobject: don't delay to cleanup module kobjectlib/ | +14 | 1 reply | |
| 2/2 | kobject: wait until kobject is cleaned up before freeing moduleinclude/ lib/ | +69 | 8 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH V2 0/2] kobject: avoid to cleanup kobject after module is unloaded
Hello,
The 1st patch improves CONFIG_DEBUG_KOBJECT_RELEASE, so that kobject cleanup after unloading module can be triggered easily. With this patch, 'modprobe kset-example' can trigger the issue very quickly.
The 2nd patch fixes the issue of cleaning up object after module is unloaded, since kobj->ktype and related callbacks are often allocated as module static variable. We need to make sure kobject is really cleaned up before freeing module. This issue is reported by Petr Mladek.
V2:
- add comment on 1st patch, suggested by Greg, 1/2
- fix build failure in case that CONFIG_MODULE is disabled, and add comment in kobj_module_callback(), 2/2
Ming Lei (2):
kobject: don't delay to cleanup module kobject
kobject: wait until kobject is cleaned up before freeing module
include/linux/kobject.h | 1 + lib/kobject.c | 82 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+)
Signature · 1 line
2.31.1