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] [day] [month] [year] [list]
Date:	Wed, 17 Oct 2007 19:32:08 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Qi Yong <qiyong@...cn.com>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Len Brown <lenb@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pavel Machek <pavel@....cz>, linux-acpi@...r.kernel.org,
	Stefan Seyfried <seife@...e.de>
Subject: Re: [PATCH] swsusp: Use platform mode by default

On Wednesday, 17 October 2007 05:44, Qi Yong wrote:
> On Wed, Oct 17, 2007 at 10:46:12AM +0800, Qi Yong wrote:
> > On 12/05/2007, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > > On Fri, 11 May 2007, Rafael J. Wysocki wrote:
[--snip--]
> 
> please apply.
> 
> Signed-off-by: Qi Yong <qiyong@...cn.com>
> ---

With your patch applied the default for ACPI systems changes from
HIBERNATION_PLATFORM to HIBERNATION_SHUTDOWN.  However,
it has been HIBERNATION_PLATFORM since 2.6.20 and I'd really
prefer it to stay this way.

If HIBERNATION_PLATFORM doesn't work for you, please do
"echo shutdown > /sys/power/disk" before hibernation or, if you use the
userland suspend tools, change the s2disk's configuration file to use the
"shutdown" mode.

> diff --git a/kernel/power/disk.c b/kernel/power/disk.c
> index eb72255..95b66ee 100644
> --- a/kernel/power/disk.c
> +++ b/kernel/power/disk.c
> @@ -61,9 +61,11 @@ void hibernation_set_ops(struct hibernation_ops *ops)
>  	}
>  	mutex_lock(&pm_mutex);
>  	hibernation_ops = ops;
> -	if (ops)
> -		hibernation_mode = HIBERNATION_PLATFORM;
> -	else if (hibernation_mode == HIBERNATION_PLATFORM)
> +
> +	/*
> +	 * Turn off HIBERNATION_PLATFORM if we no longer have any platform ops.
> +	 */
> +	if (!ops && hibernation_mode == HIBERNATION_PLATFORM)
>  		hibernation_mode = HIBERNATION_SHUTDOWN;
>  
>  	mutex_unlock(&pm_mutex);

Greetings,
Rafael
-
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