summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-02-04 11:25:45 +0100
committerChristian Brauner <brauner@kernel.org>2025-02-07 10:27:27 +0100
commitec6164adc73e57c4c43b37682cae1d5c9ad40ca1 (patch)
tree4165f46d751a5b48750797a84b4dae85d1130706 /net/socket.c
parent2cc02059fbc79306b53a44b1f1a4444aa3c76598 (diff)
parent711f9b8fbe4f4936302804e246e206f0829f628f (diff)
Merge patch series "Fix for huge faults regression"
Amir Goldstein <amir73il@gmail.com> says: The two Fix patches have been tested by Alex together and each one independently. I also verified that they pass the LTP inoityf/fanotify tests. * patches from https://lore.kernel.org/r/20250203223205.861346-1-amir73il@gmail.com: fsnotify: disable pre-content and permission events by default fsnotify: disable notification by default for all pseudo files fsnotify: use accessor to set FMODE_NONOTIFY_* Link: https://lore.kernel.org/r/20250203223205.861346-1-amir73il@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 262a28b59c7f..28bae5a94234 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -479,6 +479,11 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
sock->file = file;
file->private_data = sock;
stream_open(SOCK_INODE(sock), file);
+ /*
+ * Disable permission and pre-content events, but enable legacy
+ * inotify events for legacy users.
+ */
+ file_set_fsnotify_mode(file, FMODE_NONOTIFY_PERM);
return file;
}
EXPORT_SYMBOL(sock_alloc_file);