summaryrefslogtreecommitdiff
path: root/kernel/tsacct.c
diff options
context:
space:
mode:
authorZhao Hongjiang <zhaohongjiang@huawei.com>2013-04-30 22:26:46 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 00:04:00 (GMT)
commit04df32fa10ab9a6f0643db2949d42efc966bc844 (patch)
tree48cdb596da6d4b8bd49c743b570b63b936eba34f /kernel/tsacct.c
parentace6128d603d3f15238baba104d0b37ccf0b6c07 (diff)
downloadlinux-04df32fa10ab9a6f0643db2949d42efc966bc844.tar.xz
inotify: invalid mask should return a error number but not set it
When we run the crackerjack testsuite, the inotify_add_watch test is stalled. This is caused by the invalid mask 0 - the task is waiting for the event but it never comes. inotify_add_watch() should return -EINVAL as it did before commit 676a0675cf92 ("inotify: remove broken mask checks causing unmount to be EINVAL"). That commit removes the invalid mask check, but that check is needed. Check the mask's ALL_INOTIFY_BITS before the inotify_arg_to_mask() call. If none are set, just return -EINVAL. Because IN_UNMOUNT is in ALL_INOTIFY_BITS, this change will not trigger the problem that above commit fixed. [akpm@linux-foundation.org: fix build] Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Acked-by: Jim Somerville <Jim.Somerville@windriver.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Eric Paris <eparis@parisplace.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/tsacct.c')
0 files changed, 0 insertions, 0 deletions