[<prev] [next>] [day] [month] [year] [list]
Message-ID: <fc20e54b-08b5-49c1-99b9-3cc499edb680@p183>
Date: Mon, 10 Mar 2025 09:50:43 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Benjamin Segall <bsegall@...gle.com>,
Eric Dumazet <edumazet@...gle.com>,
Andrey Vagin <avagin@...nvz.org>,
Pavel Tikhomirov <ptikhomirov@...tuozzo.com>,
Peter Zijlstra <peterz@...radead.org>,
Cyrill Gorcunov <gorcunov@...il.com>
Subject: Re: [patch V3 06/18] posix-timers: Remove SLAB_PANIC from kmem cache
> - 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_cache can't be
> created. timer_create() will fail with -ENOMEM and 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.
Powered by blists - more mailing lists