Thomas Gleixner 55fb412ef7 debugobjects: Dont destroy kmem cache in init()
debug_objects_mem_init() is invoked from mm_core_init() before work queues
are available. If debug_objects_mem_init() destroys the kmem cache in the
error path it causes an Oops in __queue_work():

 Oops: Oops: 0000 [#1] PREEMPT SMP PTI
 RIP: 0010:__queue_work+0x35/0x6a0
  queue_work_on+0x66/0x70
  flush_all_cpus_locked+0xdf/0x1a0
  __kmem_cache_shutdown+0x2f/0x340
  kmem_cache_destroy+0x4e/0x150
  mm_core_init+0x9e/0x120
  start_kernel+0x298/0x800
  x86_64_start_reservations+0x18/0x30
  x86_64_start_kernel+0xc5/0xe0
  common_startup_64+0x12c/0x138

Further the object cache pointer is used in various places to check for
early boot operation. It is exposed before the replacments for the static
boot time objects are allocated and the self test operates on it.

This can be avoided by:

     1) Running the self test with the static boot objects

     2) Exposing it only after the replacement objects have been added to
     	the pool.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241007164913.137021337@linutronix.de
2024-10-15 17:30:30 +02:00
..
2024-07-16 14:24:29 -07:00
2024-07-12 16:39:53 -07:00
2024-02-01 13:06:40 +01:00
2018-08-16 12:14:42 -07:00
2023-11-03 07:08:36 -10:00
2021-01-21 14:06:00 -07:00
2022-03-07 12:48:35 -07:00
2021-08-19 09:02:55 +09:00
2024-04-25 21:07:06 -07:00
2023-02-02 22:50:01 -08:00
2023-02-02 22:50:01 -08:00
2024-07-30 09:30:11 -10:00
2021-01-03 20:05:18 -05:00
2024-05-21 15:29:01 -07:00
2022-03-07 12:48:35 -07:00
2022-10-03 14:03:21 -07:00
2021-08-19 09:02:55 +09:00
2024-06-25 17:15:06 -07:00
2024-09-24 13:02:06 -07:00
2024-04-25 21:07:05 -07:00
2024-05-22 11:53:02 -07:00
2023-08-21 13:46:25 -07:00
2023-04-17 18:01:23 +02:00
2021-07-08 11:48:20 -07:00
2023-10-16 12:44:06 -04:00
2023-08-24 16:20:18 -07:00
2023-10-16 12:44:06 -04:00
2018-10-16 13:45:44 +02:00
2022-10-03 17:34:32 -07:00
2024-07-04 23:43:10 -07:00
2021-07-08 11:48:20 -07:00
2024-02-15 12:17:28 -05:00
2022-06-03 10:34:34 -07:00
2024-02-20 20:47:32 -08:00
2021-06-18 11:43:09 +02:00
2024-06-10 11:14:52 +01:00
2024-09-03 21:15:42 -07:00
2024-09-03 21:15:42 -07:00