From: Zou Nan hai <nanhai.zou@intel.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@akpm
Subject: [Patch]Fix an error in copy_page_range
Date: 20 Jan 2005 13:44:46 +0800 [thread overview]
Message-ID: <1106199886.9401.19.camel@linux-znh> (raw)
Hi,
There is a bug in copy_page_range in current 2.6.11-rc1 with 4 level
page table change. copy_page_range do a continue without adding pgds and
addr when pgd_none(*src_pgd) or pgd_bad(*src_pgd).
I think it's wrong in logic, copy_page_range will run into infinite loop
when when pgd_none(*src_pgd) or pgd_bad(*src_pgd).
Although maybe this bug does not break anything currently...,
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
--- a/mm/memory.c 2005-01-21 01:21:18.000000000 +0800
+++ b/mm/memory.c 2005-01-21 04:49:13.000000000 +0800
@@ -442,17 +442,18 @@ int copy_page_range(struct mm_struct *ds
if (next > end || next <= addr)
next = end;
if (pgd_none(*src_pgd))
- continue;
+ goto next_pgd;
if (pgd_bad(*src_pgd)) {
pgd_ERROR(*src_pgd);
pgd_clear(src_pgd);
- continue;
+ goto next_pgd;
}
err = copy_pud_range(dst, src, dst_pgd, src_pgd,
vma, addr, next);
if (err)
break;
+next_pgd:
src_pgd++;
dst_pgd++;
addr = next;
next reply other threads:[~2005-01-20 7:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 5:44 Zou Nan hai [this message]
2005-01-22 11:48 ` [Patch]Fix an error in copy_page_range Nick Piggin
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=1106199886.9401.19.camel@linux-znh \
--to=nanhai.zou@intel.com \
--cc=akpm@akpm \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.