]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PNP: Avoid conflicting resource reservations
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 18 Jun 2015 16:32:02 +0000 (18:32 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 18 Jun 2015 16:32:02 +0000 (18:32 +0200)
commitfaa3ecef5806739ab044b6229de7128b3dc81c5b
tree5bce2f04ce010af4da53a42d8565bb99e50fdf44
parent45348c06c6e314742bf51b335f39d70d5cea59a9
ACPI / PNP: Avoid conflicting resource reservations

Commit d33165594194 "ACPI / init: Fix the ordering of
acpi_reserve_resources()" overlooked the fact that the memory
and/or I/O regions reserved by acpi_reserve_resources() may
conflict with those reserved by the PNP "system" driver.

If that conflict actually takes place, it causes the reservations
made by the "system" driver to fail while before commit d33165594194
all reservations made by it and by acpi_reserve_resources() would be
successful.  In turn, that allows the resources that haven't been
reserved by the "system" driver to be used by others (e.g. PCI) which
sometimes leads to functional problems (up to and including boot
failures).

To fix that issue, introduce a common resource reservation routine,
acpi_reserve_region(), to be used by both acpi_reserve_resources()
and the "system" driver, that will track all resources reserved by
it and avoid making conflicting requests.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=99831
Link: http://marc.info/?t=143389402600001&r=1&w=2
Fixes: d33165594194 "ACPI / init: Fix the ordering of acpi_reserve_resources()"
Reported-by: Roland Dreier <roland@purestorage.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/osl.c
drivers/acpi/resource.c
drivers/pnp/system.c
include/linux/acpi.h