Skip to content

Commit f7381b9

Browse files
surenbaghdasaryantehcaster
authored andcommitted
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: 09c4656 ("codetag: debug: introduce OBJEXTS_ALLOC_FAIL to mark failed slab_ext allocations") Reported-by: Shakeel Butt <[email protected]> Closes: https://lore.kernel.org/all/avhakjldsgczmq356gkwmvfilyvf7o6temvcmtt5lqd4fhp5rk@47gp2ropyixg/ Signed-off-by: Suren Baghdasaryan <[email protected]> Cc: [email protected] # v6.10+ Acked-by: Shakeel Butt <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent 4038016 commit f7381b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mm/slub.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,8 +2039,7 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s,
20392039
slab_nid(slab));
20402040
if (!vec) {
20412041
/* Mark vectors which failed to allocate */
2042-
if (new_slab)
2043-
mark_failed_objexts_alloc(slab);
2042+
mark_failed_objexts_alloc(slab);
20442043

20452044
return -ENOMEM;
20462045
}

0 commit comments

Comments
 (0)