mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 00:58:39 +02:00
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: 09c46563ff ("codetag: debug: introduce OBJEXTS_ALLOC_FAIL to mark failed slab_ext allocations")
Reported-by: Shakeel Butt <shakeel.butt@linux.dev>
Closes: https://lore.kernel.org/all/avhakjldsgczmq356gkwmvfilyvf7o6temvcmtt5lqd4fhp5rk@47gp2ropyixg/
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Cc: stable@vger.kernel.org # v6.10+
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
This commit is contained in:
parent
4038016397
commit
f7381b9116
1 changed files with 1 additions and 2 deletions
|
|
@ -2039,8 +2039,7 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s,
|
||||||
slab_nid(slab));
|
slab_nid(slab));
|
||||||
if (!vec) {
|
if (!vec) {
|
||||||
/* Mark vectors which failed to allocate */
|
/* Mark vectors which failed to allocate */
|
||||||
if (new_slab)
|
mark_failed_objexts_alloc(slab);
|
||||||
mark_failed_objexts_alloc(slab);
|
|
||||||
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue