diff options
Diffstat (limited to 'fs/notify')
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index c0ca1fa1550c..480434c5ee5f 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
@@ -769,8 +769,10 @@ SYSCALL_DEFINE(fanotify_mark)(int fanotify_fd, unsigned int flags, | |||
769 | if (flags & ~FAN_ALL_MARK_FLAGS) | 769 | if (flags & ~FAN_ALL_MARK_FLAGS) |
770 | return -EINVAL; | 770 | return -EINVAL; |
771 | switch (flags & (FAN_MARK_ADD | FAN_MARK_REMOVE | FAN_MARK_FLUSH)) { | 771 | switch (flags & (FAN_MARK_ADD | FAN_MARK_REMOVE | FAN_MARK_FLUSH)) { |
772 | case FAN_MARK_ADD: | 772 | case FAN_MARK_ADD: /* fallthrough */ |
773 | case FAN_MARK_REMOVE: | 773 | case FAN_MARK_REMOVE: |
774 | if (!mask) | ||
775 | return -EINVAL; | ||
774 | case FAN_MARK_FLUSH: | 776 | case FAN_MARK_FLUSH: |
775 | break; | 777 | break; |
776 | default: | 778 | default: |