projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a5cea7
)
Ensure FMODE_NONOTIFY is not set by userspace
author
Lino Sanfilippo
<LinoSanfilippo@gmx.de>
Fri, 29 Oct 2010 10:02:17 +0000
(12:02 +0200)
committer
Eric Paris
<eparis@redhat.com>
Sat, 30 Oct 2010 18:07:40 +0000
(14:07 -0400)
In fsnotify_open() ensure that FMODE_NONOTIFY is never set by userspace.
Also always call fsnotify_parent and fsnotify.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
include/linux/fsnotify.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/fsnotify.h
b/include/linux/fsnotify.h
index ecb43b33d18147a0ffdd32adfc6ccc69241c91ed..5c185fa27089f03b4e9194445ee7bfd842f125c6 100644
(file)
--- a/
include/linux/fsnotify.h
+++ b/
include/linux/fsnotify.h
@@
-235,10
+235,11
@@
static inline void fsnotify_open(struct file *file)
if (S_ISDIR(inode->i_mode))
mask |= FS_ISDIR;
- if (!(file->f_mode & FMODE_NONOTIFY)) {
- fsnotify_parent(path, NULL, mask);
- fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0);
- }
+ /* FMODE_NONOTIFY must never be set from user */
+ file->f_mode &= ~FMODE_NONOTIFY;
+
+ fsnotify_parent(path, NULL, mask);
+ fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0);
}
/*