Re: [PATCH v1 0/3] ACPI: bus: Rework acquiring the primary physical for a given ACPI one
"Rafael J. Wysocki (Intel)" <[email protected]> Mon, 10 Aug 2026 15:00:44 +0200
| Newsgroups | gmane.linux.acpi.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <CAJZ5v0hF49YtVAxHWtxVZBdWrboXAdGKage0nKPTD2x9y_AVoA@mail.gmail.com> |
On Mon, Aug 10, 2026 at 1:40 PM Rafael J. Wysocki <[email protected]> wrote: > > Hi All, > > This is somewhat late, but since there will be follow-up changes tree-wide, > it would be good to get it into the mainline sooner than later. > > It is based on the observation that the majority of > acpi_get_first_physical_node() callers want to hold a reference on the returned > device and the function is potentially racy because it doesn't get such a > reference itself. There were also some comments from Sashiko pointing > out to this as a "preexisting issue". > > The first patch adds a acpi_get_first_physical_node() replacement called > acpi_bus_get_primary_device() and returning a reference-counted device (the > former is retained for the time being, but made use the same code as the > latter). > > The next two patches change the core ACPI code to use the new function > instead of the old one. > > Later on, patches will be sent to switch all of the callers of > acpi_get_first_physical_node() over to using acpi_bus_get_primary_device() > and finally to drop the former. > > Thanks! I should have mentioned that this series applies to the linux-next branch of the linux-pm.git tree (and will apply to linux-next when that branch is included into it).