Page MenuHomeFreeBSD

acpi: Tasks: Ensure sane values for number of tasks and threads
Needs ReviewPublic

Authored by olce on Mon, Oct 5, 5:00 PM.
Tags
None
Referenced Files
F175102603: D60373.id.diff
Thu, Oct 8, 6:59 AM
F175091501: D60373.id.diff
Thu, Oct 8, 5:06 AM
F175074881: D60373.id188734.diff
Thu, Oct 8, 1:56 AM
Unknown Object (File)
Wed, Oct 7, 11:39 AM
Unknown Object (File)
Tue, Oct 6, 10:56 PM
Unknown Object (File)
Tue, Oct 6, 10:55 PM
Unknown Object (File)
Tue, Oct 6, 10:54 PM
Unknown Object (File)
Tue, Oct 6, 1:07 PM
Subscribers

Details

Reviewers
obiwac
jkim
emaste
Summary

Make sure that these are set to sane values even on silly tunables:

  • There must be at least one thread to process the 'acpi_taskq'.
  • Ensure that the maximum number of tasks is at least 0. Setting it to a very low positive number is still silly in practice as it will cause AcpiOSExecute() to fail more often then not, but at least won't cause huge bogus memory allocations when allocating acpi_tasks[].

Diff Detail

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

Event Timeline

olce requested review of this revision.Mon, Oct 5, 5:00 PM
olce edited the summary of this revision. (Show Details)
  • Good diff (isolated commit instead of a bunch of 3).
sys/dev/acpica/Osd/OsdSchedule.c
97

would it be reasonable to make acpi_max_tasks unsigned?

sys/dev/acpica/Osd/OsdSchedule.c
97

Oh, not if we're going to use -1 as a sentinel value :)

olce marked 2 inline comments as done.Thu, Oct 8, 8:46 AM
olce added inline comments.
sys/dev/acpica/Osd/OsdSchedule.c
97

Yes, in D60374.

olce marked an inline comment as done.Thu, Oct 8, 9:34 AM