]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ACPI: Fix stale pointer access to flags.lockable
authorToshi Kani <toshi.kani@hp.com>
Mon, 22 Oct 2012 23:31:42 +0000 (01:31 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Oct 2012 23:31:42 +0000 (01:31 +0200)
commit0e4a4a2bcbd14de70f71f7ca1fa8ec376161dc8f
tree4b571a21f2f656c0ee7a12f03717446b2cd0adb8
parente6081a678b43d1c2cac9dd087299c6dbcacaf73f
ACPI: Fix stale pointer access to flags.lockable

During hot-remove, acpi_bus_hot_remove_device() calls ACPI _LCK
method when device->flags.lockable is set. However, this device
pointer is stale since the target acpi_device object has been
already kfree'd by acpi_bus_trim().

The flags.lockable indicates whether or not this ACPI object
implements _LCK method. Fix the stable pointer access by replacing
it with acpi_get_handle() to check if _LCK is implemented.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c