[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250915200918.3855580-3-surenb@google.com>
Date: Mon, 15 Sep 2025 13:09:18 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: vbabka@...e.cz
Cc: akpm@...ux-foundation.org, cl@...two.org, rientjes@...gle.com,
roman.gushchin@...ux.dev, harry.yoo@...cle.com, shakeel.butt@...ux.dev,
alexei.starovoitov@...il.com, usamaarif642@...il.com, 00107082@....com,
souravpanda@...gle.com, kent.overstreet@...ux.dev, surenb@...gle.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: [PATCH 2/2] slab: mark slab->obj_exts allocation failures unconditionally
alloc_slab_obj_exts() should mark failed obj_exts vector allocations
independent on whether the vector is being allocated for a new or an
existing slab. Current implementation skips doing this for existing
slabs. Fix this by marking failed allocations unconditionally.
Fixes: 09c46563ff6d ("codetag: debug: introduce OBJEXTS_ALLOC_FAIL to mark failed slab_ext allocations")
Reported-by: Shakeel Butt <shakeel.butt@...ux.dev>
Closes: https://lore.kernel.org/all/avhakjldsgczmq356gkwmvfilyvf7o6temvcmtt5lqd4fhp5rk@47gp2ropyixg/
Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
Cc: stable@...r.kernel.org # v6.10+
---
mm/slub.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index af343ca570b5..cab4e7822393 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2029,8 +2029,7 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s,
slab_nid(slab));
if (!vec) {
/* Mark vectors which failed to allocate */
- if (new_slab)
- mark_failed_objexts_alloc(slab);
+ mark_failed_objexts_alloc(slab);
return -ENOMEM;
}
--
2.51.0.384.g4c02a37b29-goog
Powered by blists - more mailing lists