lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1992165.bgMBd9nLM4@vostro.rjw.lan>
Date:	Thu, 07 Feb 2013 23:18:45 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Toshi Kani <toshi.kani@...com>
Cc:	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	isimatu.yasuaki@...fujitsu.com
Subject: Re: [PATCH] ACPI: Unbind ACPI drv when probe failed

On Thursday, February 07, 2013 02:19:13 PM Toshi Kani wrote:
> When acpi_device_install_notify_handler() failed in acpi_device_probe(),
> it calls acpi_drv->ops.remove() and fails the probe.  However, the ACPI
> driver is left bound to the acpi_device.  Fix it by clearing the driver
> and driver_data fields.
> 
> Signed-off-by: Toshi Kani <toshi.kani@...com>
> ---
> This patch is based on linux-pm.git/bleeding-edge.

Good catch, thanks.  I'm going to apply it.

Rafael


> ---
>  drivers/acpi/scan.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index d6caf1d..39659bb 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -627,6 +627,8 @@ static int acpi_device_probe(struct device * dev)
>  			if (ret) {
>  				if (acpi_drv->ops.remove)
>  					acpi_drv->ops.remove(acpi_dev);
> +				acpi_dev->driver = NULL;
> +				acpi_dev->driver_data = NULL;
>  				return ret;
>  			}
>  		}
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ