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:	Tue, 17 Jan 2012 23:54:49 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Namhyung Kim <namhyung.kim@....com>
Cc:	Namhyung Kim <namhyung@...il.com>, Pavel Machek <pavel@....cz>,
	Len Brown <len.brown@...el.com>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM / Hibernate: Correct additional page calculation

On Tuesday, January 17, 2012, Namhyung Kim wrote:
> The struct bm_block is allocated by chain_alloc(),
> so it'd better counting it in LINKED_PAGE_DATA_SIZE.

Yes, good catch, thanks!

I'm going to push this to Linus in the next round of fixes.

Thanks,
Rafael


> Signed-off-by: Namhyung Kim <namhyung.kim@....com>
> ---
>  kernel/power/snapshot.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
> index cbe2c1441392..7196d3c023e1 100644
> --- a/kernel/power/snapshot.c
> +++ b/kernel/power/snapshot.c
> @@ -812,7 +812,8 @@ unsigned int snapshot_additional_pages(struct zone *zone)
>  	unsigned int res;
>  
>  	res = DIV_ROUND_UP(zone->spanned_pages, BM_BITS_PER_BLOCK);
> -	res += DIV_ROUND_UP(res * sizeof(struct bm_block), PAGE_SIZE);
> +	res += DIV_ROUND_UP(res * sizeof(struct bm_block),
> +			    LINKED_PAGE_DATA_SIZE);
>  	return 2 * res;
>  }
>  
> 

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