git: 20f7b539220a - stable/14 - acpi_panasonic: acquire serial lock before calling hkey_sound_mute in shutdown

From: Enji Cooper <ngie_at_FreeBSD.org>
Date: Mon, 02 Nov 2026 04:23:57 UTC
The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=20f7b539220ada24b3c57f312148846bc790b493

commit 20f7b539220ada24b3c57f312148846bc790b493
Author:     Abdelkader Boudih <freebsd@seuros.com>
AuthorDate: 2026-05-05 19:49:01 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-02 04:14:56 +0000

    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
    
    (cherry picked from commit 7619d14d08a0036a07dce670f55b9568f8133b38)
---
 sys/dev/acpi_support/acpi_panasonic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/acpi_support/acpi_panasonic.c b/sys/dev/acpi_support/acpi_panasonic.c
index 67d51ea9bc1f..f6e943201b23 100644
--- a/sys/dev/acpi_support/acpi_panasonic.c
+++ b/sys/dev/acpi_support/acpi_panasonic.c
@@ -228,7 +228,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);
 }