diff options
| author | Suren Baghdasaryan <surenb@google.com> | 2025-09-15 13:09:18 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-19 16:33:57 +0200 |
| commit | 715b6a5b41dae39baeaa40d3386b548bb278b9c2 (patch) | |
| tree | cc2f161a015699bf5dc3504c41cef632660b7deb /mm | |
| parent | e8baa4bf9d90029becd5953c1dd463047f7e13a1 (diff) | |
| download | linux-715b6a5b41dae39baeaa40d3386b548bb278b9c2.tar.gz linux-715b6a5b41dae39baeaa40d3386b548bb278b9c2.tar.bz2 linux-715b6a5b41dae39baeaa40d3386b548bb278b9c2.zip | |
slab: mark slab->obj_exts allocation failures unconditionally
commit f7381b9116407ba2a429977c80ff8df953ea9354 upstream.
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@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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/slub.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c index 7fbba36f7aac..b75b50ad6748 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1999,8 +1999,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; } |
