mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 18:12:57 +01:00
initialize only ACPI_BUFFER to avoid race condition with passive
cooling thread which refers psv, tc1, tc2 and tsp. The previous code made the period where sc->tz_zone.tsp was zero, and it caused panic at msleep(). Reported by: keramida Tested by: keramida
This commit is contained in:
parent
849aee62b2
commit
9b96aa9ad7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149449
@ -347,7 +347,14 @@ acpi_tz_establish(struct acpi_tz_softc *sc)
|
||||
AcpiOsFree(sc->tz_zone.al[i].Pointer);
|
||||
if (sc->tz_zone.psl.Pointer != NULL)
|
||||
AcpiOsFree(sc->tz_zone.psl.Pointer);
|
||||
bzero(&sc->tz_zone, sizeof(sc->tz_zone));
|
||||
|
||||
/*
|
||||
* XXX: We initialize only ACPI_BUFFER to avoid race condition
|
||||
* with passive cooling thread which refers psv, tc1, tc2 and tsp.
|
||||
*/
|
||||
bzero(sc->tz_zone.ac, sizeof(sc->tz_zone.ac));
|
||||
bzero(sc->tz_zone.al, sizeof(sc->tz_zone.al));
|
||||
bzero(&sc->tz_zone.psl, sizeof(sc->tz_zone.psl));
|
||||
|
||||
/* Evaluate thermal zone parameters. */
|
||||
for (i = 0; i < TZ_NUMLEVELS; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user