summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-05-15 16:28:34 +0200
committerJan Kara <jack@suse.cz>2019-05-28 18:10:07 +0200
commit0b3b094ac9a7bb1fcf5d694f3ec981e6864a63d3 (patch)
tree71e5065d0213798e38d809f0d32fcbba047db6e5 /include/linux/fs.h
parentcd6c84d8f0cdc911df435bb075ba22ce3c605b07 (diff)
downloadlwn-0b3b094ac9a7bb1fcf5d694f3ec981e6864a63d3.tar.gz
lwn-0b3b094ac9a7bb1fcf5d694f3ec981e6864a63d3.zip
fanotify: Disallow permission events for proc filesystem
Proc filesystem has special locking rules for various files. Thus fanotify which opens files on event delivery can easily deadlock against another process that waits for fanotify permission event to be handled. Since permission events on /proc have doubtful value anyway, just disallow them. Link: https://lore.kernel.org/linux-fsdevel/20190320131642.GE9485@quack2.suse.cz/ Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f7fdfe93e25d..c7136c98b5ba 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2184,6 +2184,7 @@ struct file_system_type {
#define FS_BINARY_MOUNTDATA 2
#define FS_HAS_SUBTYPE 4
#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
+#define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */
#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
int (*init_fs_context)(struct fs_context *);
const struct fs_parameter_description *parameters;