summaryrefslogtreecommitdiff
path: root/fs/crypto
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2022-06-27 20:47:19 +0300
committerJan Kara <jack@suse.cz>2022-06-28 11:18:13 +0200
commit8698e3bab4dd7968666e84e111d0bfd17c040e77 (patch)
tree984d2443835b1349a34b90bed5a45c970b5775b1 /fs/crypto
parentca1fdab7fd27eb069df1384b2850dcd0c2bebe8d (diff)
downloadlinux-rpi-8698e3bab4dd7968666e84e111d0bfd17c040e77.tar.gz
linux-rpi-8698e3bab4dd7968666e84e111d0bfd17c040e77.tar.bz2
linux-rpi-8698e3bab4dd7968666e84e111d0bfd17c040e77.zip
fanotify: refine the validation checks on non-dir inode mask
Commit ceaf69f8eadc ("fanotify: do not allow setting dirent events in mask of non-dir") added restrictions about setting dirent events in the mask of a non-dir inode mark, which does not make any sense. For backward compatibility, these restictions were added only to new (v5.17+) APIs. It also does not make any sense to set the flags FAN_EVENT_ON_CHILD or FAN_ONDIR in the mask of a non-dir inode. Add these flags to the dir-only restriction of the new APIs as well. Move the check of the dir-only flags for new APIs into the helper fanotify_events_supported(), which is only called for FAN_MARK_ADD, because there is no need to error on an attempt to remove the dir-only flags from non-dir inode. Fixes: ceaf69f8eadc ("fanotify: do not allow setting dirent events in mask of non-dir") Link: https://lore.kernel.org/linux-fsdevel/20220627113224.kr2725conevh53u4@quack3.lan/ Link: https://lore.kernel.org/r/20220627174719.2838175-1-amir73il@gmail.com Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/crypto')
0 files changed, 0 insertions, 0 deletions