linux/fs/notify
Christian Brauner c9ec8607b4
fsnotify: let a filesystem refuse marks on its objects
Don't let nullfs be watched. fanotify refuses mount and filesystem marks
on SB_NOUSER superblocks but inode marks of inotify, fanotify and
dnotify go through. The one inode of knullfs is the root of every
kernel thread and the following patches make it reachable from
userspace as the directory that stands in for an unmounted mount. A
watch placed through one such directory would report the opens through
all the others, across users.

Add FS_DISALLOW_NOTIFY next to FS_DISALLOW_NOTIFY_PERM, refuse a mark on
any object of such a filesystem in fsnotify_add_mark_list() where every
backend ends up and set it for nullfs. There's nothing to watch on a
permanently empty and immutable filesystem.

Link: https://patch.msgid.link/20261002-work-mount-fixes-4-v1-16-dd44b89d44ce@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-10-04 12:31:40 +02:00
..
dnotify fix a leak in fcntl_dirnotify() 2025-07-14 10:13:31 +02:00
fanotify fsnotify: Fix stale object mask after concurrent mark updates 2026-08-05 11:50:45 +02:00
inotify fsnotify: Fix stale object mask after concurrent mark updates 2026-08-05 11:50:45 +02:00
fdinfo.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
fdinfo.h
fsnotify.c vfs-7.2-rc1.directory.delegations 2026-06-15 02:50:44 +05:30
fsnotify.h fsnotify: Use connector list for destroying inode marks 2026-01-23 13:26:37 +01:00
group.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
Kconfig fs/notify: Remove "select SRCU" 2023-02-02 16:26:06 -08:00
Makefile
mark.c fsnotify: let a filesystem refuse marks on its objects 2026-10-04 12:31:40 +02:00
notification.c fsnotify: Pass group argument to free_event 2021-10-27 12:34:18 +02:00