lkml.org 
[lkml]   [2005]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Don't explode on swsusp failure to find swap
From
Date
On Wed, 2005-06-01 at 00:45 +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2005-05-31 at 12:36 +0200, Pavel Machek wrote:
> > Hi!
> >
> > > If we specify a swap device for swsusp using resume= kernel argument and
> > > that device doesn't exist in the swap list, we end up calling
> > > swsusp_free() before we have allocated pagedir_save. That causes us to
> > > explode when trying to free it.
> > >
> > > Pavel, does that look right ?
> >
> > It looks like a workaround. We should not call swsusp_free in case
> > device does not exists. Quick look did not reveal where the bug comes
> > from, can you try to trace it?
> > Pavel
>
> Well, the bug comes from arch code calling swsusp_save() which fails,
> then we call swsusp_free()

More specifically, arch suspend calls swsusp_save().

It fails and returns the error to the arch asm code, which itself
returns it to it's caller swsusp_suspend(), which does that:

if ((error = swsusp_arch_suspend()))
swsusp_free();

Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-01 01:55    [W:0.231 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site