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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1373500106.24916.13.camel@misato.fc.hp.com>
Date:	Wed, 10 Jul 2013 17:48:26 -0600
From:	Toshi Kani <toshi.kani@...com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Yinghai Lu <yinghai@...nel.org>
Subject: Re: [PATCH] ACPI / scan: Always call acpi_bus_scan() for bus check
 notifications

On Thu, 2013-07-11 at 00:45 +0200, Rafael J. Wysocki wrote:
> On Wednesday, July 10, 2013 02:11:05 AM Rafael J. Wysocki wrote:
> > On Tuesday, July 09, 2013 01:32:42 PM Toshi Kani wrote:
> > > On Mon, 2013-07-08 at 02:10 +0200, Rafael J. Wysocki wrote:
> > > > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > > > 
> > > > An ACPI_NOTIFY_BUS_CHECK notification means that we should scan the
> > > > entire namespace starting from the given handle even if the device
> > > > represented by that handle is present (other devices below it may
> > > > just have been added).
> > > > 
> > > > For this reason, modify acpi_scan_bus_device_check() to always run
> > > > acpi_bus_scan() if the notification being handled is of type
> > > > ACPI_NOTIFY_BUS_CHECK.
> > > > 
> > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > > > Cc: 3.10+ <stable@...r.kernel.org>
> > > 
> > > Acked-by: Toshi Kani <toshi.kani@...com>
> > > 
> > > But, I think we need the additional patch below.
> > 
> > Yes, I think you're right.
> 
> That said I'd prefer to put the check into acpi_bus_device_attach() like in
> the appended patch.

That's fine by me.  

Acked-by: Toshi Kani <toshi.kani@...com>

Just a minor point, though.  Isn't it a bit inconsistent with
device_attach(), which checks dev->driver inside the function?  That
said, I am OK with either way.

Thanks,
-Toshi


> 
> Thanks,
> Rafael
> 
> 
> ---
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Subject: ACPI / scan: Do not try to attach scan handlers to devices having them
> 
> In acpi_bus_device_attach(), if there is an ACPI device object
> for the given handle and that device object has a scan handler
> attached to it already, there's nothing more to do for that handle
> and the function should just return success immediately.  Make
> that happen.
> 
> Reported-by: Toshi Kani <toshi.kani@...com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>  drivers/acpi/scan.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> Index: linux-pm/drivers/acpi/scan.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/scan.c
> +++ linux-pm/drivers/acpi/scan.c
> @@ -1984,6 +1984,9 @@ static acpi_status acpi_bus_device_attac
>  	if (acpi_bus_get_device(handle, &device))
>  		return AE_CTRL_DEPTH;
>  
> +	if (device->handler)
> +		return AE_OK;
> +
>  	ret = acpi_scan_attach_handler(device);
>  	if (ret)
>  		return ret > 0 ? AE_OK : AE_CTRL_DEPTH;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
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