mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] debugobjects: Fix NULL pointer dereference in kmem_alloc_batch()
@ 2026-11-09  4:12 Sang-Heon Jeon
  2026-11-09  4:12 ` [PATCH 1/2] " Sang-Heon Jeon
  2026-11-09  4:12 ` [PATCH 2/2] debugobjects: Use free_object_list() in the boot error path Sang-Heon Jeon
  0 siblings, 2 replies; 5+ messages in thread
From: Sang-Heon Jeon @ 2026-11-09  4:12 UTC (permalink / raw)
  To: Andrew Morton, Thomas Gleixner; +Cc: linux-kernel

Hello,

During boot, kmem_alloc_batch() is called while obj_cache is still NULL.
If kmem_cache_zalloc() fails there, free_object_list() calls
kmem_cache_free() with obj_cache, which causes a NULL pointer dereference.

Patch 1 fixes it by passing the cache to free_object_list().

Patch 2 uses free_object_list() in the boot error path instead of open
coding the loop.

Sang-Heon Jeon (2):
  debugobjects: Fix NULL pointer dereference in kmem_alloc_batch()
  debugobjects: Use free_object_list() in the boot error path

 lib/debugobjects.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)


base-commit: 9f74092fda91ef93c2b07585785c1dc83cd7971f
-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-09  5:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09  4:12 [PATCH 0/2] debugobjects: Fix NULL pointer dereference in kmem_alloc_batch() Sang-Heon Jeon
2026-11-09  4:12 ` [PATCH 1/2] " Sang-Heon Jeon
2026-11-09  4:56   ` Andrew Morton
2026-11-09  5:15     ` Sang-Heon Jeon
2026-11-09  4:12 ` [PATCH 2/2] debugobjects: Use free_object_list() in the boot error path Sang-Heon Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®