posix-timers: Remove SLAB_PANIC from kmem cache
Quoted 8 lines
(quoted diff) +2
-3- posix_timers_cache = kmem_cache_create("posix_timers_cache", - sizeof(struct k_itimer), 0, - SLAB_PANIC | SLAB_ACCOUNT, NULL); + posix_timers_cache = kmem_cache_create("posix_timers_cache", sizeof(struct k_itimer), 0, + SLAB_ACCOUNT, NULL);There is no need to panic when the posix-timer
kmem_cachecan't be created.timer_create()will fail with-ENOMEMand that's it.
Of course there is a reason to panic.
Where did the memory go, so there is not enough for a tiny "kmem_cache" instance?
You've taken the branch from __init code which is discarded and made it a branch which can not be.
More or less every __init allocation should panic not the other way around.