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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Mar 2007 22:05:53 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	pavel@....cz, a.p.zijlstra@...llo.nl, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] swsusp: Do not use page flags

On Thursday, 15 March 2007 20:08, Andrew Morton wrote:
> > On Mon, 12 Mar 2007 22:19:20 +0100 "Rafael J. Wysocki" <rjw@...k.pl> wrote:
> > +int create_basic_memory_bitmaps(void)
> > +{
> > +	struct memory_bitmap *bm1, *bm2;
> > +	int error = 0;
> > +
> > +	BUG_ON(forbidden_pages_map || free_pages_map);
> > +
> > +	bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_ATOMIC);
> > +	if (!bm1)
> > +		return -ENOMEM;
> > +
> > +	error = memory_bm_create(bm1, GFP_ATOMIC | __GFP_COLD, PG_ANY);
> > +	if (error)
> > +		goto Free_first_object;
> > +
> > +	bm2 = kzalloc(sizeof(struct memory_bitmap), GFP_ATOMIC);
> > +	if (!bm2)
> > +		goto Free_first_bitmap;
> > +
> > +	error = memory_bm_create(bm2, GFP_ATOMIC | __GFP_COLD, PG_ANY);
> > +	if (error)
> 
> What is the risk that we'll go OOM here?  GFP_ATOMIC is rather unreliable.

Well, this can be called after processes (including kswapd) has been frozen.
We can't go to sleep at this point.

> And why _does_ suspend use GFP_ATOMIC all over the place?

Generally, because it cannot sleep.
-
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