mm/slub: release kobject if kobject_init_and_add failed in sysfs_slab_add
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 3 repliesIn review
- v11 patch 2 repliesSuperseded
Changes in v2 from the cover letter
use kobject_put() instead kobject_del().
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | mm/slub: release kobject if kobject_init_and_add failed in sysfs_slab_addmm/ | +3 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH V2 0/1] mm/slub: release kobject if kobject_init_and_add failed in sysfs_slab_add
In kobject_init_and_add() function, the refcount is setted by calling kobject_init() function, regardless of whether the return value is zero or not, therefore, we must call kobject_del(&s->kobj) to prevent memory of s->kobj is leaked.
V1 -> V2
use kobject_put() instead kobject_del().
V1:
https://patchwork.kernel.org/project/linux-mm/patch/[email protected]/
Xin Hao (1):
mm/slub: release kobject if kobject_init_and_add failed in
sysfs_slab_add
mm/slub.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
--
2.31.0