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: <201202172352.28478.rjw@sisk.pl>
Date:	Fri, 17 Feb 2012 23:52:28 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	pavel@....cz, len.brown@...el.com, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM/Hibernate: Enable usermodehelpers in hibernate() error path

On Thursday, February 16, 2012, Srivatsa S. Bhat wrote:
> If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
> before returning. Fix this. And while at it, reword the goto labels so that
> they look more meaningful.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>

Applied, thanks for catching this!

Rafael


> ---
> 
>  kernel/power/hibernate.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 72baaf0..0a186cf 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -618,7 +618,7 @@ int hibernate(void)
>  	/* Allocate memory management structures */
>  	error = create_basic_memory_bitmaps();
>  	if (error)
> -		goto Exit;
> +		goto Enable_umh;
>  
>  	printk(KERN_INFO "PM: Syncing filesystems ... ");
>  	sys_sync();
> @@ -626,7 +626,7 @@ int hibernate(void)
>  
>  	error = freeze_processes();
>  	if (error)
> -		goto Finish;
> +		goto Free_bitmaps;
>  
>  	error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
>  	if (error || freezer_test_done)
> @@ -659,8 +659,9 @@ int hibernate(void)
>  	/* Don't bother checking whether freezer_test_done is true */
>  	freezer_test_done = false;
>  
> - Finish:
> + Free_bitmaps:
>  	free_basic_memory_bitmaps();
> + Enable_umh:
>  	usermodehelper_enable();
>   Exit:
>  	pm_notifier_call_chain(PM_POST_HIBERNATION);
> 
> 
> 

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