lkml.org 
[lkml]   [2023]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 03/20] KFENCE: cleanup kfence_guarded_alloc() after CONFIG_SLAB removal
    On Mon, 13 Nov 2023 at 20:14, Vlastimil Babka <vbabka@suse.cz> wrote:
    >
    > Some struct slab fields are initialized differently for SLAB and SLUB so
    > we can simplify with SLUB being the only remaining allocator.
    >
    > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

    Reviewed-by: Marco Elver <elver@google.com>

    > ---
    > mm/kfence/core.c | 4 ----
    > 1 file changed, 4 deletions(-)
    >
    > diff --git a/mm/kfence/core.c b/mm/kfence/core.c
    > index 3872528d0963..8350f5c06f2e 100644
    > --- a/mm/kfence/core.c
    > +++ b/mm/kfence/core.c
    > @@ -463,11 +463,7 @@ static void *kfence_guarded_alloc(struct kmem_cache *cache, size_t size, gfp_t g
    > /* Set required slab fields. */
    > slab = virt_to_slab((void *)meta->addr);
    > slab->slab_cache = cache;
    > -#if defined(CONFIG_SLUB)
    > slab->objects = 1;
    > -#elif defined(CONFIG_SLAB)
    > - slab->s_mem = addr;
    > -#endif
    >
    > /* Memory initialization. */
    > set_canary(meta);
    > --
    > 2.42.1
    >

    \
     
     \ /
      Last update: 2023-11-20 13:58    [W:4.284 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site