Konstantin Belousov
f7780c61e7
The unp_gc() function drops and reaquires lock between scan and
...
collect phases. The unp_discard() function executes
unp_externalize_fp(), which might make the socket eligible for gc-ing,
and then, later, taskqueue will close the socket. Since unp_gc()
dropped the list lock to do the malloc, close might happen after the
mark step but before the collection step, causing collection to not
find the socket and miss one array element.
I believe that the race was there before r216158, but the stated
revision made the window much wider by postponing the close to
taskqueue sometimes.
Only process as much array elements as we find the sockets during
second phase of gc [1]. Take linkage lock and recheck the eligibility
of the socket for gc, as well as call fhold() under the linkage lock.
Reported and tested by: jmallett
Submitted by: jmallett [1]
Reviewed by: rwatson, jeff (possibly)
MFC after: 1 week
2011-02-01 13:33:49 +00:00
..
2010-09-13 08:34:20 +00:00
2010-05-23 18:32:02 +00:00
2011-01-08 18:41:19 +00:00
2010-09-21 16:24:51 +00:00
2011-01-06 22:26:00 +00:00
2010-08-30 14:26:02 +00:00
2010-06-21 09:55:56 +00:00
2010-04-26 13:48:22 +00:00
2010-11-22 19:32:54 +00:00
2011-01-12 19:54:19 +00:00
2010-12-11 08:44:10 +00:00
2010-08-09 14:48:31 +00:00
2010-06-30 18:03:42 +00:00
2010-07-23 16:46:42 +00:00
2010-11-01 00:42:25 +00:00
2011-01-28 15:29:35 +00:00
2010-08-22 11:09:53 +00:00
2010-01-10 22:34:18 +00:00
2011-01-12 19:54:19 +00:00
2010-03-30 18:31:55 +00:00
2011-01-08 16:13:44 +00:00
2010-11-22 09:06:59 +00:00
2010-12-21 18:23:03 +00:00
2011-01-25 10:59:21 +00:00
2010-04-30 03:10:53 +00:00
2011-01-11 01:11:07 +00:00
2009-11-03 16:46:52 +00:00
2011-01-11 22:15:30 +00:00
2011-01-26 20:03:58 +00:00
2010-12-21 13:45:29 +00:00
2011-01-06 22:26:00 +00:00
2010-07-21 10:14:04 +00:00
2010-10-21 19:17:40 +00:00
2011-01-18 21:14:18 +00:00
2011-01-11 13:59:06 +00:00
2009-06-25 18:54:56 +00:00
2011-01-27 00:34:12 +00:00
2010-06-21 09:55:56 +00:00
2011-01-12 19:54:19 +00:00
2010-11-22 15:28:54 +00:00
2010-11-09 20:46:41 +00:00
2011-01-13 18:20:27 +00:00
2010-11-25 20:05:11 +00:00
2009-08-15 23:07:43 +00:00
2010-08-22 11:18:57 +00:00
2011-01-25 10:59:21 +00:00
2010-07-18 20:57:53 +00:00
2010-12-29 09:26:46 +00:00
2010-11-16 14:08:21 +00:00
2010-03-24 19:21:26 +00:00
2010-06-21 09:55:56 +00:00
2010-10-24 16:31:57 +00:00
2011-01-25 10:59:21 +00:00
2010-06-11 18:46:34 +00:00
2011-01-12 19:54:19 +00:00
2011-01-06 22:19:15 +00:00
2010-10-21 20:31:50 +00:00
2011-01-27 00:34:12 +00:00
2011-01-19 23:00:25 +00:00
2010-10-23 13:16:39 +00:00
2010-12-09 05:16:20 +00:00
2010-10-09 02:50:23 +00:00
2011-01-08 18:51:15 +00:00
2010-12-29 09:26:46 +00:00
2009-08-23 20:40:19 +00:00
2010-03-03 21:46:51 +00:00
2010-11-14 20:14:25 +00:00
2010-11-08 20:57:08 +00:00
2009-06-11 17:05:45 +00:00
2010-10-02 22:12:41 +00:00
2010-06-28 18:06:46 +00:00
2010-11-19 17:56:16 +00:00
2010-11-19 17:56:16 +00:00
2011-01-14 17:06:54 +00:00
2011-01-14 17:06:54 +00:00
2009-10-20 16:36:51 +00:00
2010-12-13 18:56:04 +00:00
2010-08-30 16:30:18 +00:00
2011-01-06 22:09:37 +00:00
2010-05-05 20:39:02 +00:00
2011-01-18 21:14:18 +00:00
2011-01-09 14:34:56 +00:00
2011-01-04 10:59:38 +00:00
2010-09-02 19:40:28 +00:00
2010-03-19 19:51:03 +00:00
2010-06-21 09:55:56 +00:00
2010-03-07 22:37:35 +00:00
2010-02-21 19:53:33 +00:00
2010-09-30 16:47:01 +00:00
2011-01-12 19:54:19 +00:00
2011-01-27 00:34:12 +00:00
2011-01-04 10:59:38 +00:00
2010-06-21 09:55:56 +00:00
2010-06-21 09:55:56 +00:00
2011-01-21 10:26:26 +00:00
2011-01-11 13:59:06 +00:00
2010-07-12 15:32:45 +00:00
2010-07-18 20:57:53 +00:00
2010-08-12 17:17:05 +00:00
2010-09-16 16:13:12 +00:00
2009-08-21 02:59:07 +00:00
2011-01-27 00:34:12 +00:00
2011-01-12 19:54:19 +00:00
2010-09-22 06:45:07 +00:00
2010-11-23 14:30:22 +00:00
2011-01-25 10:59:21 +00:00
2010-01-09 01:46:38 +00:00
2010-05-08 20:34:01 +00:00
2010-07-09 10:57:55 +00:00
2011-01-27 00:34:12 +00:00
2010-08-28 17:42:08 +00:00
2010-12-25 21:26:56 +00:00
2011-01-26 20:03:58 +00:00
2010-06-29 20:44:19 +00:00
2010-08-30 14:26:02 +00:00
2010-08-30 14:24:44 +00:00
2010-08-30 14:26:02 +00:00
2010-03-19 11:01:51 +00:00
2011-01-18 21:14:18 +00:00
2011-01-18 21:14:18 +00:00
2011-01-18 21:14:18 +00:00
2010-01-04 20:59:52 +00:00
2010-02-07 15:42:15 +00:00
2010-02-07 15:42:15 +00:00
2010-04-08 08:58:18 +00:00
2011-01-04 10:59:38 +00:00
2009-10-17 08:59:41 +00:00
2011-01-04 10:59:38 +00:00
2009-12-28 22:56:30 +00:00
2010-12-26 01:42:52 +00:00
2009-08-24 10:03:41 +00:00
2010-06-21 09:55:56 +00:00
2010-07-18 20:57:53 +00:00
2010-10-09 02:50:23 +00:00
2010-11-19 17:57:50 +00:00
2010-12-02 17:37:16 +00:00
2009-06-22 21:46:40 +00:00
2010-11-12 13:02:26 +00:00
2011-01-28 17:37:09 +00:00
2011-02-01 13:33:49 +00:00
2010-06-03 13:45:27 +00:00
2010-10-09 02:50:23 +00:00
2010-12-29 22:26:49 +00:00
2010-11-14 16:10:15 +00:00
2010-08-09 22:56:10 +00:00
2010-08-25 18:09:51 +00:00
2009-09-28 18:07:16 +00:00
2010-07-18 20:57:53 +00:00
2010-08-22 11:18:57 +00:00
2011-01-24 17:08:26 +00:00
2011-01-08 19:50:13 +00:00
2011-01-25 14:04:02 +00:00
2010-08-22 11:18:57 +00:00
2010-06-26 21:44:45 +00:00
2010-05-12 21:24:46 +00:00