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>] [day] [month] [year] [list]
Message-Id: <201106182244.36876.rjw@sisk.pl>
Date:	Sat, 18 Jun 2011 22:44:36 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Michal Kubecek <mkubecek@...e.cz>
Cc:	linux-pm@...ts.linux-foundation.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [linux-pm] [PATCH 3.0-rc3] PM: free memory bitmaps if opening /dev/snapshot fails

On Friday, June 17, 2011, Michal Kubecek wrote:
> From: Michal Kubecek <mkubecek@...e.cz>
> 
> When opening /dev/snapshot device, snapshot_open() creates memory
> bitmaps which are freed in snapshot_release(). But if any of the
> callbacks called by pm_notifier_call_chain() returns NOTIFY_BAD, open()
> fails, snapshot_release() is never called and bitmaps are not freed.
> Next attempt to open /dev/snapshot then triggers BUG_ON() check in
> create_basic_memory_bitmaps(). This happens e.g. when vmwatchdog module
> is active on s390x.
> 
> Signed-off-by: Michal Kubecek <mkubecek@...e.cz>

Thanks, I'm going to push your patch for 3.0 + stable.

Rafael


> --- 
> 
> diff --git a/kernel/power/user.c b/kernel/power/user.c
> index 7d02d33..42ddbc6 100644
> --- a/kernel/power/user.c
> +++ b/kernel/power/user.c
> @@ -113,8 +113,10 @@ static int snapshot_open(struct inode *inode, struct file *filp)
>  		if (error)
>  			pm_notifier_call_chain(PM_POST_RESTORE);
>  	}
> -	if (error)
> +	if (error) {
> +		free_basic_memory_bitmaps();
>  		atomic_inc(&snapshot_device_available);
> +	}
>  	data->frozen = 0;
>  	data->ready = 0;
>  	data->platform_support = 0;
> _______________________________________________
> linux-pm mailing list
> linux-pm@...ts.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
> 
> 

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