public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
To: Anthony Yznaga <anthony.yznaga@oracle.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org, akpm@linux-foundation.org,
	david@kernel.org,  Liam.Howlett@oracle.com, vbabka@kernel.org,
	rppt@kernel.org, surenb@google.com,  mhocko@suse.com,
	jannh@google.com, pfalcato@suse.de, Jason@zx2c4.com,
	 shuah@kernel.org
Subject: Re: [PATCH v2 1/2] mm: fix mmap errno value when MAP_DROPPABLE is not supported
Date: Tue, 7 Apr 2026 11:05:57 +0100	[thread overview]
Message-ID: <adTWtnIMxao-_Fhd@lucifer> (raw)
In-Reply-To: <20260402235933.10588-2-anthony.yznaga@oracle.com>

On Thu, Apr 02, 2026 at 04:59:32PM -0700, Anthony Yznaga wrote:
> On configs where MAP_DROPPABLE is not supported (currently any 32-bit
> config except for PPC32), mmap fails with errno set to ENOTSUPP.
> However, ENOTSUPP is not a standard error value that userspace knows
> about. The acceptable userspace-visible errno to use is EOPNOTSUPP.
> checkpatch.pl has a warning to this effect.

Hmm, weird it was missed on initial patchset, but checkpatch.pl is
unfortunately overly noisy about silly things quite often so things can be
missed fairly easily.

>
> Fixes: 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily freeable mappings")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com>

Nice catch, LGTM, so:

Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>

> ---
>  mm/mmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 5754d1c36462..2311ae7c2ff4 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -504,7 +504,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
>  			break;
>  		case MAP_DROPPABLE:
>  			if (VM_DROPPABLE == VM_NONE)
> -				return -ENOTSUPP;
> +				return -EOPNOTSUPP;
>  			/*
>  			 * A locked or stack area makes no sense to be droppable.
>  			 *
> --
> 2.47.3
>

Cheers, Lorenzo


  parent reply	other threads:[~2026-04-07 10:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 23:59 [PATCH v2 0/2] fix MAP_DROPPABLE not supported errno Anthony Yznaga
2026-04-02 23:59 ` [PATCH v2 1/2] mm: fix mmap errno value when MAP_DROPPABLE is not supported Anthony Yznaga
2026-04-03 18:16   ` Vlastimil Babka (SUSE)
2026-04-06  8:35   ` Pedro Falcato
2026-04-07 10:05   ` Lorenzo Stoakes (Oracle) [this message]
2026-04-02 23:59 ` [PATCH v2 2/2] selftests/mm: verify droppable mappings cannot be locked Anthony Yznaga
2026-04-03 19:31   ` Andrew Morton
2026-04-03 17:37 ` [PATCH v2 0/2] fix MAP_DROPPABLE not supported errno Andrew Morton

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=adTWtnIMxao-_Fhd@lucifer \
    --to=ljs@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=anthony.yznaga@oracle.com \
    --cc=david@kernel.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /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