The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=664ad9ac4c9047d29d5f37d43174e1b469e2ec80
commit 664ad9ac4c9047d29d5f37d43174e1b469e2ec80 Author: Olivier Certner <[email protected]> AuthorDate: 2026-07-07 13:34:21 +0000 Commit: Olivier Certner <[email protected]> CommitDate: 2026-07-15 21:26:47 +0000 acpi_cpu(4): Call ACPI_GET_FEATURES() on a reset 'features' variable This is to prevent child drivers from using the features returned by previous drivers (in an arbitrary order). None of the existing ones do that, so this is purely defensive. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi_cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index d2358f7077e5..48f6a27c1e89 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -313,7 +313,6 @@ acpi_cpu_attach(device_t dev) struct acpi_cpu_softc *sc; struct acpi_softc *acpi_sc; ACPI_STATUS status; - u_int features; int cpu_id, drv_count, i; driver_t **drivers; uint32_t cap_set[3]; @@ -417,6 +416,8 @@ acpi_cpu_attach(device_t dev) if (devclass_get_drivers(device_get_devclass(dev), &drivers, &drv_count) == 0) { for (i = 0; i < drv_count; i++) { + u_int features = 0; + if (ACPI_GET_FEATURES(drivers[i], &features) == 0) sc->cpu_features |= features; }
