From: "Chen, Yu C" <yu.c.chen@intel.com>
To: "rjw@rjwysocki.net" <rjw@rjwysocki.net>,
"Brown, Len" <len.brown@intel.com>, "pavel@ucw.cz" <pavel@ucw.cz>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"yinghai@kernel.org" <yinghai@kernel.org>,
"joeyli.kernel@gmail.com" <joeyli.kernel@gmail.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Zhang, Rui" <rui.zhang@intel.com>
Subject: RE: [PATCH] [v2] PM / hibernate: Fix hibernation panic caused by inconsistent e820 map
Date: Wed, 2 Sep 2015 08:24:25 +0000 [thread overview]
Message-ID: <36DF59CE26D8EE47B0655C516E9CE6401CB03D29@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1441101816-24567-1-git-send-email-yu.c.chen@intel.com>
Hi, all,
I'll do some small modifications on this patch and will
send out a v3 version later. Because:
1.some boudary conditions need to be adjusted and
2.the page frame validation code will be moved to the
place where Joey once put in his patch(which would
look more reasonable)
Please refer to detail below:
Thanks!
:
> -----Original Message-----
> From: Chen, Yu C
> Sent: Tuesday, September 01, 2015 6:04 PM
> To: rjw@rjwysocki.net; Brown, Len; pavel@ucw.cz
> Cc: mingo@redhat.com; yinghai@kernel.org; joeyli.kernel@gmail.com; linux-
> pm@vger.kernel.org; linux-kernel@vger.kernel.org; Chen, Yu C
> Subject: [PATCH] [v2] PM / hibernate: Fix hibernation panic caused by
> inconsistent e820 map
>
> +static void mark_valid_pages(struct memory_bitmap *bm) {
> + unsigned long start_pfn, end_pfn;
> + int i, j;
> +
> + for (i = 0; i < nr_pfn_mapped; i++) {
> + start_pfn = pfn_mapped[i].start;
> + end_pfn = pfn_mapped[i].end;
> + for (j = start_pfn; j <= end_pfn; j++)
Changed j <= end_pfn to j < end_pfn
> -2427,11 +2526,19 @@ static void *get_buffer(struct memory_bitmap *bm,
> - if (swsusp_page_is_forbidden(page) &&
> swsusp_page_is_free(page))
> + if (swsusp_page_is_forbidden(page) &&
> swsusp_page_is_free(page)) {
> - return page_address(page);
> + if (is_valid_orig_page(pfn))
Moved to mark_unsafe_pages
> + return page_address(page);
> + else
> + return ERR_PTR(-EFAULT);
> + }
Best Regards,
Yu
next prev parent reply other threads:[~2015-09-02 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 10:03 Chen Yu
2015-09-02 8:24 ` Chen, Yu C [this message]
2015-09-17 5:40 ` 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=36DF59CE26D8EE47B0655C516E9CE6401CB03D29@SHSMSX101.ccr.corp.intel.com \
--to=yu.c.chen@intel.com \
--cc=joeyli.kernel@gmail.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=yinghai@kernel.org \
/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®