All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jan Kara <jack@suse.cz>, Amir Goldstein <amir73il@gmail.com>,
	Christian Brauner <brauner@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Guenter Roeck <linux@roeck-us.net>,
	Iulian Vaideanu <iulian.vaideanu@gmail.com>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	regressions@lists.linux.dev, sparclinux@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 6.12.y] fs: move FMODE_NONOTIFY back to bit 26
Date: Tue, 24 Nov 2026 09:30:22 -0500	[thread overview]
Message-ID: <20261124143022.3509525-1-sashal@kernel.org> (raw)

The backport of commit a94204f4d48e ("fsnotify: opt-in for permission
events at file open time") moved FMODE_NONOTIFY to bit 25, which is
__O_TMPFILE on sparc. 6.12.y still passes FMODE_NONOTIFY in open flags, so
the BUILD_BUG_ON() in fcntl_init() has broken sparc builds since v6.12.105.

Swap it with FMODE_NONOTIFY_PERM, which never ends up in open flags.

Upstream avoided this with commit ebe559609d78 ("fs: get rid of
__FMODE_NONOTIFY kludge"), but overlayfs in 6.12.y still uses
__FMODE_NONOTIFY.

Fixes: 07ee6057f92a ("fsnotify: opt-in for permission events at file open time")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/7701ab76-4761-4596-b6a5-92c74e03ce5f@roeck-us.net/
Reported-by: Iulian Vaideanu <iulian.vaideanu@gmail.com>
Closes: https://lore.kernel.org/all/CAPK=yVMe1Ro=aw_daLCOM9cBATsp6crdgB4wd0ty4vrnxtVKkQ@mail.gmail.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

 include/linux/fs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 67b57ce46b203..d696a21b69ee2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -178,13 +178,13 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
  * Together with FMODE_NONOTIFY_PERM defines which fsnotify events shouldn't be
  * generated (see below)
  */
-#define FMODE_NONOTIFY		((__force fmode_t)(1 << 25))
+#define FMODE_NONOTIFY		((__force fmode_t)(1 << 26))
 
 /*
  * Together with FMODE_NONOTIFY defines which fsnotify events shouldn't be
  * generated (see below)
  */
-#define FMODE_NONOTIFY_PERM	((__force fmode_t)(1 << 26))
+#define FMODE_NONOTIFY_PERM	((__force fmode_t)(1 << 25))
 
 /* File is capable of returning -EAGAIN if I/O will block */
 #define FMODE_NOWAIT		((__force fmode_t)(1 << 27))

base-commit: e2e4b92c2b2a3ae78423cb343951cb5d2241b405
-- 
2.53.0


                 reply	other threads:[~2026-11-24 14:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261124143022.3509525-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=andreas@gaisler.com \
    --cc=brauner@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=iulian.vaideanu@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=sparclinux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.