aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdelkader Boudih <freebsd@seuros.com>2026-05-05 19:49:01 +0000
committerEnji Cooper <ngie@FreeBSD.org>2026-05-05 19:51:38 +0000
commit7619d14d08a0036a07dce670f55b9568f8133b38 (patch)
treefbd35b1a76d7ed6d567450c3660b59a3edf5e2f1
parentfd386e76fa2b29d99525c246cbfc05768a1f4a76 (diff)
acpi_panasonic: acquire serial lock before calling hkey_sound_mute in shutdown
acpi_panasonic_shutdown() calls hkey_sound_mute() without holding the ACPI serial lock. Every other call site holds `ACPI_SERIAL_BEGIN(panasonic)` before calling it, as the locking model is caller-owned. This seems to affect the whole Panasonic Toughtbook lineup btw. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56718
-rw-r--r--sys/dev/acpi_support/acpi_panasonic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/acpi_support/acpi_panasonic.c b/sys/dev/acpi_support/acpi_panasonic.c
index 8fea47ee45e8..5f54ca07c5a6 100644
--- a/sys/dev/acpi_support/acpi_panasonic.c
+++ b/sys/dev/acpi_support/acpi_panasonic.c
@@ -233,7 +233,9 @@ acpi_panasonic_shutdown(device_t dev)
/* Mute the main audio during reboot to prevent static burst to speaker. */
sc = device_get_softc(dev);
mute = 1;
+ ACPI_SERIAL_BEGIN(panasonic);
hkey_sound_mute(sc->handle, HKEY_SET, &mute);
+ ACPI_SERIAL_END(panasonic);
return (0);
}