Oleg Nesterov
abd96ecb29
exec: kill unsafe BUG_ON(sig->count) checks
...
de_thread:
if (atomic_read(&oldsighand->count) <= 1)
BUG_ON(atomic_read(&sig->count) != 1);
This is not safe without the rmb() in between. The results of two
correctly ordered __exit_signal()->atomic_dec_and_test()'s could be seen
out of order on our CPU.
The same is true for the "thread_group_empty()" case, __unhash_process()'s
changes could be seen before atomic_dec_and_test(&sig->count).
On some platforms (including i386) atomic_read() doesn't provide even the
compiler barrier, in that case these checks are simply racy.
Remove these BUG_ON()'s. Alternatively, we can do something like
BUG_ON( ({ smp_rmb(); atomic_read(&sig->count) != 1; }) );
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.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>
2007-08-22 19:52:47 -07:00
..
2007-07-16 16:03:25 -05:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-31 15:39:40 -07:00
2007-05-11 08:29:36 -07:00
2007-08-22 19:52:46 -07:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-08-18 00:15:20 +00:00
2007-07-21 17:49:14 -07:00
2007-07-20 10:11:58 +09:00
2007-05-07 12:12:51 -07:00
2007-07-18 15:49:48 -07:00
2007-05-08 11:14:59 -07:00
2007-08-14 10:31:02 +01:00
2007-08-22 19:52:44 -07:00
2007-07-20 10:11:58 +09:00
2007-07-17 10:23:06 -07:00
2007-07-26 11:35:17 -07:00
2007-07-26 11:35:17 -07:00
2007-07-31 15:39:37 -07:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-08-14 10:34:40 +01:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-10 08:04:13 +02:00
2007-07-20 10:11:58 +09:00
2007-02-12 09:48:47 -08:00
2007-07-20 10:11:58 +09:00
2007-07-31 15:39:41 -07:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-08-20 22:44:27 -07:00
2007-07-20 10:11:58 +09:00
2007-07-26 11:11:56 -07:00
2007-07-20 10:11:58 +09:00
2007-02-12 09:48:46 -08:00
2007-07-31 15:39:41 -07:00
2007-08-07 16:12:50 -04:00
2006-10-20 10:26:41 -07:00
2007-07-31 15:39:38 -07:00
2007-07-16 09:05:52 -07:00
2007-07-20 10:11:58 +09:00
2007-08-09 17:27:58 -07:00
2007-07-20 10:11:58 +09:00
2007-07-30 00:27:31 -07:00
2007-07-31 15:39:40 -07:00
2007-07-20 10:11:58 +09:00
2007-07-31 15:39:36 -07:00
2007-07-26 11:11:58 -07:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-31 15:39:43 -07:00
2007-07-20 10:11:58 +09:00
2007-02-12 09:48:46 -08:00
2007-07-26 11:11:57 -07:00
2007-05-11 08:29:37 -07:00
2007-07-17 11:50:26 -07:00
2007-07-17 12:00:03 -07:00
2007-07-10 08:04:15 +02:00
2006-12-08 08:28:41 -08:00
2007-07-19 10:04:47 -07:00
2007-07-21 17:49:14 -07:00
2007-05-08 11:15:07 -07:00
2007-06-08 17:23:32 -07:00
2007-07-19 10:04:45 -07:00
2007-07-19 10:04:45 -07:00
2006-10-04 06:51:26 -06:00
2007-07-24 09:28:11 +02:00
2007-07-20 10:11:58 +09:00
2007-07-20 08:44:19 -07:00
2007-07-19 10:04:43 -07:00
2007-08-06 15:06:03 -04:00
2007-07-19 10:04:45 -07:00
2007-07-20 10:11:58 +09:00
2007-07-29 17:09:29 -07:00
2007-08-20 22:50:25 -07:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-07-16 09:05:36 -07:00
2007-05-18 13:09:34 -07:00
2007-07-20 10:11:58 +09:00
2007-08-22 19:52:47 -07:00
2007-07-20 10:11:58 +09:00
2007-05-21 09:18:19 -07:00
2007-05-08 11:15:07 -07:00
2006-12-22 08:55:50 -08:00
2007-05-08 11:15:01 -07:00
2007-01-26 12:53:20 -08:00
2007-07-17 12:00:03 -07:00
2007-07-20 10:11:58 +09:00
2007-07-20 10:11:58 +09:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:09 -07:00
2007-07-16 09:05:48 -07:00
2007-02-12 09:48:32 -08:00
2007-07-19 15:09:02 -04:00
2007-05-21 14:34:00 +09:00
2007-05-09 06:44:57 +02:00
2007-07-31 15:39:43 -07:00
2007-05-11 08:29:36 -07:00
2007-07-20 10:11:58 +09:00
2007-05-11 08:29:35 -07:00
2007-07-19 10:04:45 -07:00
2007-07-20 10:11:58 +09:00
2007-07-19 10:04:45 -07:00
2006-09-30 20:52:31 +02:00
2007-07-31 15:39:42 -07:00
2007-07-27 08:08:51 +02:00
2007-05-08 11:15:11 -07:00
2006-12-08 08:28:51 -08:00
2006-10-01 00:39:19 -07:00
2007-07-27 15:40:13 -07:00
2007-07-10 08:04:15 +02:00
2006-10-01 00:39:28 -07:00
2007-05-08 11:15:09 -07:00
2007-05-09 07:10:02 +02:00
2007-07-16 09:05:45 -07:00
2007-08-22 19:52:46 -07:00
2007-07-27 08:08:51 +02:00
2007-02-19 14:21:50 -08:00
2007-05-08 11:15:07 -07:00
2007-07-16 09:05:46 -07:00
2007-06-28 11:38:30 -07:00
2007-07-26 11:35:17 -07:00
2007-07-17 12:00:03 -07:00
2007-02-14 08:09:54 -08:00
2007-07-17 12:00:03 -07:00