Re: [RFC][PATCH 0/3] swsusp: Do not use page flags (was: Re: Remove page flags for software suspend)

Pavel Machek
2007-03-08T23:15:12Z

Hi!

> + region = kzalloc(sizeof(struct nosave_region), GFP_ATOMIC);
> + if (!region) {
> + printk(KERN_WARNING "swsusp: Not enough memory "
> + "to register a nosave region!\n");
> + WARN_ON(1);
> + return;
> + }

That's a no-no. ATOMIC alocations can fail, and no, WARN_ON is not
enough. It is not a bug, they just fail.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html