From: Akinobu Mita Date: Sun, 6 May 2007 21:49:52 +0000 (-0700) Subject: slob: handle SLAB_PANIC flag X-Git-Tag: Ubuntu-5.13.0-19.19~51965 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bc0055aee40ba40627361d8ffd8530d315920f18;p=mirror_ubuntu-jammy-kernel.git slob: handle SLAB_PANIC flag kmem_cache_create() for slob doesn't handle SLAB_PANIC. Signed-off-by: Matt Mackall Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slob.c b/mm/slob.c index 03cce3d3d986..77786be032e0 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -298,7 +298,8 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, c->align = (flags & SLAB_MUST_HWCACHE_ALIGN) ? SLOB_ALIGN : 0; if (c->align < align) c->align = align; - } + } else if (flags & SLAB_PANIC) + panic("Cannot create slab cache %s\n", name); return c; }