Matthew Dillon
389d2b6e21
Fix a refcount race with the vmspace structure. In order to prevent
...
resource starvation we clean-up as much of the vmspace structure as we
can when the last process using it exits. The rest of the structure
is cleaned up when it is reaped. But since exit1() decrements the ref
count it is possible for a double-free to occur if someone else, such as
the process swapout code, references and then dereferences the structure.
Additionally, the final cleanup of the structure should not occur until
the last process referencing it is reaped.
This commit solves the problem by introducing a secondary reference count,
calling 'vm_exitingcnt'. The normal reference count is decremented on exit
and vm_exitingcnt is incremented. vm_exitingcnt is decremented when the
process is reaped. When both vm_exitingcnt and vm_refcnt are 0, the
structure is freed for real.
MFC after: 3 weeks
2002-12-15 18:50:04 +00:00
..
2002-10-07 05:06:38 +00:00
2002-04-04 23:39:10 +00:00
2002-02-11 03:54:30 +00:00
2002-09-21 22:07:17 +00:00
2002-07-20 02:56:12 +00:00
2002-07-20 02:56:12 +00:00
2002-11-08 20:49:50 +00:00
2002-07-20 02:56:12 +00:00
2002-09-21 22:07:17 +00:00
2002-11-05 01:59:56 +00:00
2002-03-25 13:52:45 +00:00
2002-11-30 22:15:30 +00:00
2002-11-16 06:36:56 +00:00
2002-12-14 08:18:06 +00:00
2002-12-14 08:18:06 +00:00
2002-09-26 07:38:56 +00:00
2002-11-18 01:59:31 +00:00
2002-10-25 07:11:12 +00:00
2002-10-05 17:10:28 +00:00
2002-11-16 06:35:53 +00:00
2002-12-13 09:59:40 +00:00
2002-12-14 02:07:32 +00:00
2002-10-29 20:51:44 +00:00
2002-12-14 02:07:32 +00:00
2002-12-15 18:50:04 +00:00
2002-12-10 02:33:45 +00:00
2002-10-12 05:32:24 +00:00
2002-10-17 21:02:02 +00:00
2002-12-14 02:07:32 +00:00
2002-12-10 02:33:45 +00:00
2002-10-02 07:44:29 +00:00
2002-09-26 07:38:56 +00:00
2002-10-02 07:44:29 +00:00
2002-12-14 08:18:06 +00:00
2002-11-30 19:00:51 +00:00
2002-11-07 21:56:05 +00:00
2002-12-14 01:56:26 +00:00
2002-11-01 18:58:12 +00:00
2002-11-07 23:57:17 +00:00
2002-12-14 01:56:26 +00:00
2002-04-04 21:03:38 +00:00
2002-10-25 08:40:20 +00:00
2002-10-11 10:36:22 +00:00
2002-10-11 14:58:34 +00:00
2002-08-18 07:05:00 +00:00
2002-11-21 09:30:55 +00:00
2002-08-01 17:47:56 +00:00
2002-10-12 05:32:24 +00:00
2002-04-04 21:03:38 +00:00
2002-11-18 02:41:03 +00:00
2002-10-25 19:10:58 +00:00
2002-11-28 08:44:26 +00:00
2002-10-14 20:43:02 +00:00
2002-04-04 20:49:35 +00:00
2002-12-10 02:33:45 +00:00
2002-03-18 07:45:30 +00:00
2002-10-27 07:12:34 +00:00
2002-11-01 18:52:20 +00:00
2002-12-10 02:33:45 +00:00
2002-12-14 01:56:26 +00:00
2002-09-05 11:42:03 +00:00
2002-08-22 12:47:22 +00:00
2002-06-29 02:00:02 +00:00
2002-11-15 22:55:06 +00:00
2002-11-19 22:12:42 +00:00
2002-11-19 22:12:42 +00:00
2002-02-27 10:07:15 +00:00
2002-10-29 15:47:06 +00:00
2002-10-20 22:33:42 +00:00
2002-11-15 22:55:06 +00:00
2002-11-17 04:15:34 +00:00
2002-11-21 09:30:55 +00:00
2002-12-14 08:18:06 +00:00
2002-03-19 21:25:46 +00:00
2002-05-18 23:46:04 +00:00
2002-11-30 00:49:43 +00:00
2002-03-19 21:25:46 +00:00
2002-08-07 19:43:54 +00:00
2002-10-17 20:03:38 +00:00
2002-10-22 00:59:49 +00:00
2002-09-20 19:36:05 +00:00
2002-10-01 07:24:55 +00:00
2002-10-17 20:03:38 +00:00
2002-07-19 17:44:44 +00:00
2002-05-01 02:51:50 +00:00
2002-06-10 22:40:26 +00:00
2002-11-14 16:11:12 +00:00
2002-11-27 04:26:00 +00:00
2002-10-22 18:44:59 +00:00
2002-08-30 04:04:37 +00:00
2002-07-15 17:17:56 +00:00
2002-11-14 16:11:12 +00:00
2002-10-01 13:15:11 +00:00
2002-11-27 03:55:22 +00:00
2002-08-07 19:43:54 +00:00
2002-10-04 09:58:17 +00:00
2002-10-02 09:09:25 +00:00
2002-09-11 08:13:56 +00:00
2002-08-01 13:35:38 +00:00
2002-11-08 19:00:17 +00:00
2002-10-25 08:40:20 +00:00
2002-11-11 16:36:20 +00:00
2002-03-31 22:37:00 +00:00
2002-12-14 01:56:26 +00:00
2002-10-14 21:15:04 +00:00
2002-10-16 16:28:33 +00:00
2002-11-01 21:31:13 +00:00
2002-11-16 06:36:56 +00:00
2002-11-16 06:35:53 +00:00
2002-04-01 21:31:13 +00:00
2002-12-15 09:41:46 +00:00
2002-10-19 02:07:35 +00:00
2002-08-15 02:10:12 +00:00
2002-03-24 05:09:11 +00:00
2002-10-17 20:03:38 +00:00
2002-04-16 17:09:22 +00:00
2002-03-19 21:25:46 +00:00
2002-08-19 19:04:53 +00:00
2002-10-03 02:13:00 +00:00
2002-10-11 14:58:34 +00:00
2002-05-31 11:52:35 +00:00
2002-07-21 19:06:46 +00:00
2002-11-26 17:59:16 +00:00
2002-10-16 01:54:46 +00:00
2002-10-16 10:42:13 +00:00
2002-11-05 18:52:25 +00:00
2002-11-05 18:52:25 +00:00
2002-11-27 13:34:04 +00:00
2002-10-06 14:39:15 +00:00
2002-10-28 21:17:53 +00:00
2002-12-14 08:18:06 +00:00
2002-11-17 04:15:34 +00:00
2002-12-14 01:35:30 +00:00
2002-09-02 22:40:30 +00:00
2002-11-07 22:41:08 +00:00
2002-10-24 17:55:49 +00:00
2002-06-30 05:23:58 +00:00
2002-12-14 08:18:06 +00:00
2002-06-22 21:44:11 +00:00
2002-10-19 21:25:51 +00:00
2002-12-14 08:18:06 +00:00
2002-12-15 05:41:56 +00:00
2002-12-14 08:18:06 +00:00
2002-10-25 00:20:37 +00:00
2002-09-26 00:31:16 +00:00