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]
Date:   Wed, 22 Mar 2017 01:58:30 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     "Lee, Chun-Yi" <joeyli.kernel@...il.com>
Cc:     Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org, "Lee, Chun-Yi" <jlee@...e.com>,
        Michal Hocko <mhocko@...e.com>, Jiri Kosina <jkosina@...e.cz>
Subject: Re: [PATCH] acpi: check the online state of all children in container

On Wednesday, March 22, 2017 09:01:48 AM Lee, Chun-Yi wrote:
> Just checking the state of container is not enough to confirm that
> the whole container is offlined.

And why is that so?

> Kernel should checks all children's
> offline state as the logic in acpi_container_offline().
> 
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Len Brown <lenb@...nel.org>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Jiri Kosina <jkosina@...e.cz>
> Signed-off-by: "Lee, Chun-Yi" <jlee@...e.com>
> ---
>  drivers/acpi/scan.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 1926918..f08ca31 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -260,13 +260,15 @@ static int acpi_scan_try_to_offline(struct acpi_device *device)
>  static int acpi_scan_hot_remove(struct acpi_device *device)
>  {
>  	acpi_handle handle = device->handle;
> +	struct acpi_device *child;
>  	unsigned long long sta;
>  	acpi_status status;
>  
>  	if (device->handler && device->handler->hotplug.demand_offline
>  	    && !acpi_force_hot_remove) {
> -		if (!acpi_scan_is_offline(device, true))
> -			return -EBUSY;
> +		list_for_each_entry(child, &device->children, node)
> +			if (!acpi_scan_is_offline(child, false))
> +				return -EBUSY;
>  	} else {
>  		int error = acpi_scan_try_to_offline(device);
>  		if (error)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ