From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: [PATCH 0/2] ACPI / scan: Two fixes for device hot-removal Date: Sat, 09 Feb 2013 15:26 +0100 Message-ID: <2074190.mMzUc3TOxk@vostro.rjw.lan> References: <1873429.MS5RQDxTye@vostro.rjw.lan> <5090866.2BHgpRnuEZ@vostro.rjw.lan> <1468930.acVuhKfKYv@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from hydra.sisk.pl ([212.160.235.94]:36271 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760693Ab3BIOYv (ORCPT ); Sat, 9 Feb 2013 09:24:51 -0500 In-Reply-To: <1468930.acVuhKfKYv@vostro.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: ACPI Devel Maling List Cc: Bjorn Helgaas , Mika Westerberg , Yinghai Lu , Jiang Liu , Toshi Kani , LKML , Yasuaki Ishimatsu Hi, The following two patches fix issues I've found revently in the ACPI device hot-removal code. Patch [1/2] makes acpi_bus_hot_remove_device() hold acpi_scan_lock around the whole removal procedure to prevent potential race condition between acpi_bus_scan() and a conflicting evaluation of _EJ0 from happening. Patch [2/2] makes acpi_device_unregister() put devices (supporting that) into D3cold to prevent potential problems with removing power from them without preparation from happening and removes the totally wrong evaluation of _PS3 from acpi_bus_hot_remove_device(). Thanks, Rafael -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.