The thermal thread needs to take Giant before it does anything with the
interpreter. Submitted by: Magnus B{ckstr|m <b@etek.chalmers.se>
This commit is contained in:
parent
391a2becf1
commit
5da19f398a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91215
@ -31,6 +31,8 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/reboot.h>
|
||||
@ -780,6 +782,8 @@ acpi_tz_thread(void *arg)
|
||||
for (;;) {
|
||||
tsleep(&acpi_tz_proc, PZERO, "nothing", hz * acpi_tz_polling_rate);
|
||||
|
||||
mtx_lock(&Giant);
|
||||
|
||||
if (devcount == 0)
|
||||
devclass_get_devices(acpi_tz_devclass, &devs, &devcount);
|
||||
|
||||
@ -787,5 +791,7 @@ acpi_tz_thread(void *arg)
|
||||
for (i = 0; i < devcount; i++)
|
||||
acpi_tz_timeout(device_get_softc(devs[i]));
|
||||
ACPI_UNLOCK;
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user