Warner Losh 53366abd02 Close, but not eliminate, a race condition. It is one that properly
designed drivers would never hit, but was exposed in diving into
another problem...

When expanding the devclass array, free the old memory after updating
the pointer to the new memory.  For the following single race case,
this helps:

	allocate new memory
	copy to new memory
	free old memory
<interrupt>				read pointer to freed memory
	update pointer to new memory

Now we do
	allocate new memory
	copy to new memory
	update pointer to new memory
	free old memory

Which closes this problem, but doesn't even begin to address the
multicpu races, which all should be covered by Giant at the moment,
but likely aren't completely.

Note: reviewers were ok with this fix, but suggested the use case
wasn't one we wanted to encourage.

Reviewed by:	jhb, scottl.
2008-10-10 17:49:47 +00:00
..
2008-09-25 20:08:36 +00:00
2008-09-23 14:25:56 +00:00
2008-08-03 21:07:19 +00:00
2008-09-22 10:37:02 +00:00
2008-09-16 14:57:23 +00:00
2008-05-12 06:42:06 +00:00
2008-04-29 05:48:05 +00:00
2008-05-23 04:06:49 +00:00
2007-12-14 21:30:51 +00:00
2008-07-27 21:45:20 +00:00
2008-07-13 17:15:05 +00:00
2008-07-18 07:10:33 +00:00
2008-09-25 20:08:36 +00:00
2008-09-25 20:08:36 +00:00