mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
To: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	 Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	 Vlastimil Babka <vbabka@suse.cz>,
	 Roman Gushchin <roman.gushchin@linux.dev>,
	 Hyeonggon Yoo <42.hyeyoo@gmail.com>
Subject: Re: [PATCH] mm/slab: simplify SLAB_* flag handling
Date: Fri, 17 Jan 2025 14:13:24 -0800 (PST)	[thread overview]
Message-ID: <0fa27da8-d523-77f7-0473-bb317ec9d83e@gentwo.org> (raw)
In-Reply-To: <20250117113226.3484784-1-kevin.brodsky@arm.com>

On Fri, 17 Jan 2025, Kevin Brodsky wrote:

> index a29457bef626..3b07cdaac3ae 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -305,18 +305,6 @@ struct kmem_cache *__kmem_cache_create_args(const char *name,
>  		goto out_unlock;
>  	}
>
> -	/* Refuse requests with allocator specific flags */
> -	if (flags & ~SLAB_FLAGS_PERMITTED) {
> -		err = -EINVAL;
> -		goto out_unlock;
> -	}

I think we should keep checking for invalid flags.
 -
> -	/*
> -	 * Some allocators will constraint the set of valid flags to a subset
> -	 * of all flags. We expect them to define CACHE_CREATE_MASK in this
> -	 * case, and we'll just provide them with a sanitized version of the
> -	 * passed flags.
> -	 */
>  	flags &= CACHE_CREATE_MASK;

This would silently clear some flags instead of creating an error.



  reply	other threads:[~2025-01-17 22:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-17 11:32 Kevin Brodsky
2025-01-17 22:13 ` Christoph Lameter (Ampere) [this message]
2025-01-21 10:46   ` Kevin Brodsky
2025-01-24 15:41     ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fa27da8-d523-77f7-0473-bb317ec9d83e@gentwo.org \
    --to=cl@gentwo.org \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kevin.brodsky@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®