Zhao Hongjiang
04df32fa10
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>
2013-04-30 17:04:00 -07:00
..
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-04-30 09:36:50 -07:00
2013-03-03 19:36:31 -08:00
2013-04-14 10:52:54 -07:00
2012-12-20 22:34:00 +00:00
2013-03-03 19:36:31 -08:00
2013-04-10 15:54:14 -05:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-07 01:08:55 -08:00
2013-02-27 19:10:24 -08:00
2013-04-09 14:08:16 -04:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-02-27 19:10:24 -08:00
2013-03-13 15:23:44 +01:00
2013-04-29 15:54:33 -07:00
2013-04-03 12:37:17 -04:00
2013-04-30 09:36:50 -07:00
2013-04-29 18:28:41 -07:00
2013-03-12 18:55:21 -07:00
2013-04-29 15:54:27 -07:00
2013-03-03 19:36:31 -08:00
2013-04-30 09:36:50 -07:00
2013-03-03 19:36:31 -08:00
2013-04-17 16:10:45 -07:00
2013-03-13 15:47:50 -07:00
2013-03-11 07:09:48 -07:00
2013-03-03 19:36:31 -08:00
2013-04-17 16:10:44 -07:00
2013-03-12 18:55:21 -07:00
2013-04-29 15:54:39 -07:00
2013-04-29 15:54:39 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-02-28 18:02:55 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-04-30 09:36:50 -07:00
2013-02-13 06:15:14 -08:00
2013-04-29 18:28:41 -07:00
2013-03-03 19:36:31 -08:00
2013-04-30 17:04:00 -07:00
2013-03-03 19:36:31 -08:00
2013-04-29 15:54:27 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-04-30 08:15:40 -07:00
2013-02-21 09:38:18 -08:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-03-11 22:05:56 +01:00
2013-02-26 20:16:07 -08:00
2013-03-29 17:08:43 +01:00
2013-03-03 19:36:31 -08:00
2013-03-11 07:09:48 -07:00
2013-04-05 15:35:52 -07:00
2013-03-12 18:55:21 -07:00
2013-03-14 11:20:22 +02:00
2013-03-11 07:09:48 -07:00
2013-04-30 09:36:50 -07:00
2013-03-19 15:17:40 -07:00
2013-04-26 07:56:18 -07:00
2013-02-26 02:46:11 -05:00
2013-02-22 23:31:31 -05:00
2013-02-26 20:16:07 -08:00
2013-04-17 16:10:44 -07:00
2013-02-22 23:31:31 -05:00
2013-03-03 19:36:31 -08:00
2012-12-20 17:40:19 -08:00
2013-04-18 09:00:26 -07:00
2013-04-01 15:48:47 -07:00
2013-04-29 15:54:39 -07:00
2013-02-22 23:31:31 -05:00
2013-03-12 11:05:45 -07:00
2013-02-27 19:10:11 -08:00
2013-03-26 18:25:57 -04:00
2013-04-29 15:54:29 -07:00
2013-01-02 09:16:43 -08:00
2013-04-29 15:54:34 -07:00
2013-02-22 23:31:31 -05:00
2012-12-20 14:04:11 -08:00
2013-03-01 19:48:30 -05:00
2013-02-19 08:42:45 +01:00
2013-03-03 19:36:31 -08:00
2013-03-01 23:51:07 -05:00
2013-02-28 13:21:44 -08:00
2013-04-13 16:13:55 -07:00
2013-03-21 13:11:11 -04:00
2013-02-22 23:31:31 -05:00
2013-01-17 13:08:45 +01:00
2012-12-20 18:46:29 -05:00
2013-02-22 23:31:31 -05:00
2013-04-29 15:54:33 -07:00
2013-03-08 09:03:07 -08:00
2013-04-09 12:22:49 -07:00
2013-03-03 13:23:03 -08:00
2013-03-12 08:29:17 -07:00
2013-03-27 07:50:05 -07:00
2013-03-27 07:50:05 -07:00
2013-04-29 15:54:28 -07:00
2013-02-22 23:31:31 -05:00
2013-02-07 20:51:08 +01:00
2013-03-03 13:23:03 -08:00
2013-03-21 13:11:11 -04:00
2013-02-26 02:46:08 -05:00
2012-12-20 18:50:07 -05:00
2013-02-27 19:10:24 -08:00
2013-02-22 23:31:31 -05:00
2013-03-02 09:35:13 -05:00
2012-12-20 18:50:08 -05:00
2012-12-20 18:50:11 -05:00