From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@zip.com.au>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] swsusp: clean up resume error path
Date: Tue, 18 Oct 2005 11:17:26 +0200 [thread overview]
Message-ID: <200510181117.27068.rjw@sisk.pl> (raw)
In-Reply-To: <20051017234723.GB13148@atrey.karlin.mff.cuni.cz>
Hi,
On Tuesday, 18 of October 2005 01:47, Pavel Machek wrote:
> Hi!
>
> > The following patch removes an incorrect call to restore_highmem() from
> > the resume error path (there's no saved highmem in that case) and makes
> > swsusp touch the softlockup watchdog if there's no error (currently it only
> > touches the watchdog if an error occurs).
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Index: linux-2.6.14-rc4-mm1/kernel/power/swsusp.c
> > ===================================================================
> > --- linux-2.6.14-rc4-mm1.orig/kernel/power/swsusp.c 2005-10-17 23:28:34.000000000 +0200
> > +++ linux-2.6.14-rc4-mm1/kernel/power/swsusp.c 2005-10-17 23:28:47.000000000 +0200
> > @@ -628,7 +629,6 @@
> > */
> > swsusp_free();
> > restore_processor_state();
> > - restore_highmem();
> > touch_softlockup_watchdog();
> > device_power_up();
> > local_irq_enable();
>
> I don't like this one. restore_highmem() does freeing of allocated
> pages. If swsusp_arch_suspend() fails in specific way, I suspect it
> could leak highmem.
The pages to be freed are only allocated in suspend_prepare_image()
(now swsusp_save()), which is on suspend, and this is the resume
error path.
The boot kernel that performs the resume does not save highmem,
so it need not and IMO it should not call restore_highmem() in the
error path (if nothing more, it's misleading). OTOH if the resume
succeeds, restore_highmem() will be called from swsusp_suspend().
Gretings,
Rafael
next prev parent reply other threads:[~2005-10-18 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 21:36 [PATCH 0/4] swsusp: more cleanups Rafael J. Wysocki
2005-10-17 21:40 ` [PATCH 1/4] swsusp: get rid of unnecessary wrapper function Rafael J. Wysocki
2005-10-17 23:37 ` Pavel Machek
2005-10-17 21:50 ` [PATCH 2/4] swsusp: clean up resume error path Rafael J. Wysocki
2005-10-17 23:47 ` Pavel Machek
2005-10-18 9:17 ` Rafael J. Wysocki [this message]
2005-10-21 13:28 ` Pavel Machek
2005-10-17 21:58 ` [PATCH 3/4] swsusp: two simplifications Rafael J. Wysocki
2005-10-17 23:54 ` Pavel Machek
2005-10-17 22:13 ` [PATCH 4/4] swsusp: reduce the use of global variables Rafael J. Wysocki
2005-10-17 23:56 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200510181117.27068.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®