Initialize time_lock before calling cpu_initclocks(). This corrects a

race condition in which hardclock fires before the mutex is initialized
leading to a "corrupt spinlock" panic.

Submitted by:	attilio
This commit is contained in:
Robert Watson 2007-05-23 17:27:01 +00:00
parent c792928f01
commit 63d69d2592
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169906

View File

@ -174,8 +174,8 @@ initclocks(dummy)
* Set divisors to 1 (normal case) and let the machine-specific
* code do its bit.
*/
cpu_initclocks();
mtx_init(&time_lock, "time lock", NULL, MTX_SPIN);
cpu_initclocks();
/*
* Compute profhz/stathz, and fix profhz if needed.