Vitaly Mayatskikh
dfe16dfa4a
do_wait: fix sys_waitid()-specific behaviour
...
do_wait() checks ->wo_info to figure out who is the caller. If it's not
NULL the caller should be sys_waitid(), in that case do_wait() fixes up
the retval or zeros ->wo_info, depending on retval from underlying
function.
This is bug: user can pass ->wo_info == NULL and sys_waitid() will return
incorrect value.
man 2 waitid says:
waitid(): returns 0 on success
Test-case:
int main(void)
{
if (fork())
assert(waitid(P_ALL, 0, NULL, WEXITED) == 0);
return 0;
}
Result:
Assertion `waitid(P_ALL, 0, ((void *)0), 4) == 0' failed.
Move that code to sys_waitid().
User-visible change: sys_waitid() will return 0 on success, either
infop is set or not.
Note, there's another bug in wait_noreap_copyout() which affects
return value of sys_waitid(). It will be fixed in next patch.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24 07:21:00 -07:00
..
2009-08-20 10:29:28 +10:00
2009-09-11 13:21:31 -07:00
2009-09-23 18:13:10 -07:00
2009-09-24 07:20:56 -07:00
2009-09-24 09:34:24 +09:30
2009-08-24 11:33:40 +10:00
2009-06-08 12:31:53 -07:00
2009-06-24 00:02:38 -04:00
2009-06-24 00:00:52 -04:00
2009-06-24 00:02:38 -04:00
2009-06-24 00:02:38 -04:00
2009-06-24 00:00:52 -04:00
2009-06-24 00:02:38 -04:00
2009-01-14 14:15:19 +01:00
2009-09-24 07:20:58 -07:00
2009-09-24 07:20:58 -07:00
2009-04-30 19:24:24 +02:00
2009-09-15 09:19:38 -07:00
2009-09-24 07:20:58 -07:00
2008-11-14 10:39:23 +11:00
2009-09-23 11:02:26 -07:00
2009-09-18 09:48:52 -07:00
2009-03-31 23:00:27 -04:00
2009-09-24 07:21:00 -07:00
2009-04-05 11:04:19 -07:00
2009-09-23 09:46:15 -07:00
2009-07-18 14:19:53 +02:00
2009-08-10 15:41:12 +02:00
2009-09-11 13:16:22 -07:00
2009-06-16 19:47:48 -07:00
2009-09-23 09:46:15 -07:00
2009-02-11 11:04:16 +01:00
2009-08-29 14:10:07 +02:00
2009-09-23 07:39:30 -07:00
2008-12-25 09:31:28 +01:00
2009-07-29 19:10:34 -07:00
2009-09-19 13:13:17 -07:00
2009-05-15 07:56:24 -05:00
2009-09-23 18:12:10 -07:00
2009-09-23 07:39:29 -07:00
2009-01-06 10:44:31 -08:00
2009-09-09 17:30:06 +02:00
2009-02-11 10:18:04 +01:00
2009-07-24 10:53:29 +02:00
2009-09-23 07:39:29 -07:00
2009-02-14 23:27:59 +01:00
2009-09-23 07:39:30 -07:00
2009-09-24 07:20:57 -07:00
2009-09-22 07:17:43 -07:00
2009-01-14 18:09:02 +01:00
2009-01-14 18:09:02 +01:00
2009-06-11 17:55:42 +02:00
2009-01-14 18:09:02 +01:00
2008-11-26 08:22:50 +01:00
2009-09-24 07:20:58 -07:00
2009-06-18 13:03:56 -07:00
2009-09-21 15:14:53 +02:00
2009-06-12 21:46:58 +09:30
2009-09-21 14:34:11 +02:00
2009-06-18 13:03:55 -07:00
2009-09-22 07:17:38 -07:00
2009-08-29 14:10:07 +02:00
2009-08-21 21:43:46 +02:00
2009-09-23 07:39:28 -07:00
2009-09-20 20:15:40 +02:00
2009-09-24 07:20:59 -07:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-09-19 08:53:22 +02:00
2009-04-05 11:04:19 -07:00
2009-09-24 07:20:59 -07:00
2009-09-23 07:39:41 -07:00
2009-04-06 11:14:02 +02:00
2009-08-06 05:50:21 +02:00
2009-09-18 20:47:30 +02:00
2009-08-02 14:26:09 +02:00
2009-03-30 22:05:17 +10:30
2009-09-17 10:17:25 +02:00
2009-09-21 09:06:17 -07:00
2009-09-17 10:17:25 +02:00
2009-09-21 09:53:55 +02:00
2009-09-21 09:53:55 +02:00
2009-03-24 23:16:51 +01:00
2009-09-24 07:20:58 -07:00
2009-03-02 15:41:30 -08:00
2009-09-24 07:20:59 -07:00
2009-06-16 19:47:49 -07:00
2009-09-24 09:34:47 +09:30
2009-09-17 15:53:44 -04:00
2009-01-16 14:06:04 +01:00
2009-08-31 18:08:50 +02:00
2008-12-25 11:44:43 +01:00
2009-03-30 22:05:17 +10:30
2009-09-21 14:28:04 +02:00
2009-09-23 07:39:30 -07:00
2009-02-01 01:04:33 -08:00
2009-09-23 18:13:10 -07:00
2009-07-12 14:03:27 -07:00
2009-01-06 15:59:20 -08:00
2009-09-15 10:17:30 +02:00
2009-09-23 09:46:15 -07:00
2009-09-21 15:14:55 +02:00
2009-03-09 08:13:35 -07:00
2009-09-23 18:13:10 -07:00
2009-01-12 16:04:37 +01:00
2009-02-27 16:26:21 -08:00
2009-06-15 21:30:23 -07:00
2009-04-02 19:05:01 -07:00
2009-06-18 13:03:55 -07:00
2009-08-10 14:43:09 +02:00
2009-09-11 13:23:18 -07:00