Commit c810e8df authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI fixes from Rafael Wysocki:
 "These fix two coding mistakes, one in the ACPI resources handling code
  and one in ACPICA:

   - Relocate the addr->info.mem.caching check in acpi_decode_space() to
     only execute it if the resource is of the correct type (Ilpo
     Järvinen)

   - Don't release a context_mutex that was never acquired in
     acpi_remove_address_space_handler() (Daniil Tatianin)"

* tag 'acpi-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPICA: events/evxfregn: don't release the ContextMutex that was never acquired
  ACPI: resource: Fix memory resource type union access
parents c30c65f3 e14d5ae2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -232,8 +232,6 @@ acpi_remove_address_space_handler(acpi_handle device,

			/* Now we can delete the handler object */

			acpi_os_release_mutex(handler_obj->address_space.
					      context_mutex);
			acpi_ut_remove_reference(handler_obj);
			goto unlock_and_exit;
		}
+3 −3
Original line number Diff line number Diff line
@@ -250,6 +250,9 @@ static bool acpi_decode_space(struct resource_win *win,
	switch (addr->resource_type) {
	case ACPI_MEMORY_RANGE:
		acpi_dev_memresource_flags(res, len, wp);

		if (addr->info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
			res->flags |= IORESOURCE_PREFETCH;
		break;
	case ACPI_IO_RANGE:
		acpi_dev_ioresource_flags(res, len, iodec,
@@ -265,9 +268,6 @@ static bool acpi_decode_space(struct resource_win *win,
	if (addr->producer_consumer == ACPI_PRODUCER)
		res->flags |= IORESOURCE_WINDOW;

	if (addr->info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
		res->flags |= IORESOURCE_PREFETCH;

	return !(res->flags & IORESOURCE_DISABLED);
}