]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs/notify/fanotify/fanotify_user.c: fix FAN_MARK_FLUSH flag checking
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 22 May 2014 00:42:25 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:42:25 +0000 (10:42 +1000)
commit75fdfd72e77cfb1266118eced47684282711a884
treebc5cb586ecd37e27d4dcfd728e352c44930f6b79
parentafdd1ce284c7a4442e3e7832123edfb7639b840b
fs/notify/fanotify/fanotify_user.c: fix FAN_MARK_FLUSH flag checking

If fanotify_mark is called with illegal value of arguments flags and marks
it usually returns EINVAL.

When fanotify_mark is called with FAN_MARK_FLUSH the argument flags is not
checked for irrelevant flags like FAN_MARK_IGNORED_MASK.

The patch removes this inconsistency.

If an irrelevant flag is set error EINVAL is returned.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/notify/fanotify/fanotify_user.c