Page MenuHomeFreeBSD

acpi: Fix panic when reading 'hw.acpi.suspend_state' knob on S1/S2
AcceptedPublic

Authored by olce on Wed, Jun 3, 4:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 11, 5:37 PM
Unknown Object (File)
Wed, Jun 10, 10:44 PM
Unknown Object (File)
Wed, Jun 10, 1:43 PM
Unknown Object (File)
Tue, Jun 9, 6:37 AM
Unknown Object (File)
Mon, Jun 8, 8:09 PM
Unknown Object (File)
Mon, Jun 8, 3:02 PM
Unknown Object (File)
Mon, Jun 8, 7:48 AM
Unknown Object (File)
Mon, Jun 8, 12:24 AM
Subscribers

Details

Reviewers
obiwac
Summary

The 'hw.acpi.suspend_state' sysctl knob was re-introduced with a bug.
Its handler, acpi_suspend_state_sysctl(), expects the ACPI softc in
'arg1', but the knob was registered with NULL there. This causes
a panic (NULL dereference) when reading the knob if the suspend state
has been set to S1 or S2 or equivalently the suspend sleep type to
STANDBY.

Fix it by passing the ACPI softc as 'arg1' when registering the knob.

Fixes: 9e1e29bd5ec6 ("acpi: Add back hw.acpi.suspend_state sysctl")
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73640
Build 70523: arc lint + arc unit