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]
Message-Id: <201201302350.57661.rjw@sisk.pl>
Date:	Mon, 30 Jan 2012 23:50:57 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	"pavel@....cz" <pavel@....cz>,
	"len.brown@...el.com" <len.brown@...el.com>,
	Tejun Heo <tj@...nel.org>,
	Linux PM mailing list <linux-pm@...r.kernel.org>,
	"linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PM/Hibernate: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path

On Monday, January 30, 2012, Srivatsa S. Bhat wrote:
> In the SNAPSHOT_CREATE_IMAGE ioctl, if the call to hibernation_snapshot()
> fails, the frozen tasks are not thawed.
> 
> And in the case of success, if we happen to exit due to a successful freezer
> test, all tasks (including those of userspace) are thawed, whereas actually
> we should have thawed only the kernel threads at that point. Fix both these
> issues.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>

Applied.

Thanks,
Rafael


> ---
> This applies on top of the patch posted at https://lkml.org/lkml/2012/1/27/501
> 
>  kernel/power/user.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/power/user.c b/kernel/power/user.c
> index e5a21a8..3e10007 100644
> --- a/kernel/power/user.c
> +++ b/kernel/power/user.c
> @@ -249,13 +249,15 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
>  		}
>  		pm_restore_gfp_mask();
>  		error = hibernation_snapshot(data->platform_support);
> -		if (!error) {
> +		if (error) {
> +			thaw_kernel_threads();
> +		} else {
>  			error = put_user(in_suspend, (int __user *)arg);
>  			if (!error && !freezer_test_done)
>  				data->ready = 1;
>  			if (freezer_test_done) {
>  				freezer_test_done = false;
> -				thaw_processes();
> +				thaw_kernel_threads();
>  			}
>  		}
>  		break;
> 
> 
> 
> 

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