Page MenuHomeFreeBSD

acpi_spmc(4): INVARIANTS: Do not panic on getting constraints failure
ClosedPublic

Authored by olce on Mon, May 4, 8:32 PM.
Tags
None
Referenced Files
F157151618: D56812.id.diff
Mon, May 18, 7:41 PM
Unknown Object (File)
Sat, May 16, 5:52 PM
Unknown Object (File)
Sat, May 16, 6:29 AM
Unknown Object (File)
Sat, May 16, 6:29 AM
Unknown Object (File)
Sat, May 16, 3:04 AM
Unknown Object (File)
Thu, May 14, 7:03 PM
Unknown Object (File)
Thu, May 14, 10:18 AM
Unknown Object (File)
Thu, May 14, 9:40 AM
Subscribers

Details

Summary

Just continue without constraints checking in this case.

To this end, remove the 'constraints_populated' field from 'struct
acpi_spmc_softc' and any reference to it.

However, we introduce another boolean, 'sc->get_constraints_succeeded',
in order to check (under INVARIANTS) that acpi_spmc_get_constraints() is
called only once on success. Calling that function another time after
a success would leak memory. It would be easy to change that function
to support multiple calls (e.g., by adding a call to
acpi_spmc_free_constraints() near its start), however trying to retrieve
the constraints again simply looks like wasted time as the same results
are expected to be returned on each call.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olce requested review of this revision.Mon, May 4, 8:32 PM
This revision is now accepted and ready to land.Thu, May 7, 2:37 AM
This revision now requires review to proceed.Thu, May 7, 8:06 PM
This revision is now accepted and ready to land.Mon, May 11, 8:53 AM

Impacts of changes in earlier revisions, no real change.

This revision now requires review to proceed.Tue, May 12, 1:34 PM
This revision is now accepted and ready to land.Tue, May 12, 2:09 PM