From c9c83164bf8fbc1d78ef1a3ede8b94c6f8a1d8aa Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Thu, 13 Jan 2022 12:53:05 -0800 Subject: [PATCH] ANDROID: fsnotify: Fix Open Check The previous version would miss if FS_OPEN_EXEC was set. Change-Id: I52d55bed2ca029f8fae8576f831a0621f2d02804 Fixes: b99f858e42d3 ("ANDROID: fsnotify: Notify lower fs of open") Bug: 70706497 Signed-off-by: Daniel Rosenberg --- include/linux/fsnotify.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 252790dd0b9f..156aedf05fa3 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -90,7 +90,7 @@ static inline int fsnotify_file(struct file *file, __u32 mask) /* * Open calls notify early on, so lower file system must be notified */ - if (mask == FS_OPEN) { + if (mask & FS_OPEN) { if (path->dentry->d_op && path->dentry->d_op->d_canonical_path) { struct path lower_path;