From: zhan rongkai <zhanrk@gmail.com>
To: zhan rongkai <zhanrk@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: fix the bug of __free_pages() of mm/page_alloc.c
Date: Fri, 21 Jan 2005 11:40:52 +0800 [thread overview]
Message-ID: <73e6204505012019406cf47f04@mail.gmail.com> (raw)
In-Reply-To: <73e62045050120193214c1abf7@mail.gmail.com>
--- linux-2.6.10.orig/mm/page_alloc.c 2004-12-25 05:33:51.000000000 +0800
+++ linux-2.6.10/mm/page_alloc.c 2005-01-21 11:43:44.000000000 +0800
@@ -788,7 +788,22 @@
fastcall void __free_pages(struct page *page, unsigned int order)
{
- if (!PageReserved(page) && put_page_testzero(page)) {
+ if (!PageReserved(page)) {
+#ifdef CONFIG_MMU
+ if (!put_page_testzero(page))
+ return;
+#else
+ int i, result = 1;
+
+ /*
+ * We need to de-reference all the pages for this order -- see
set_page_refs()
+ */
+ for (i = 0; i < (1 << order); i++)
+ result &= put_page_testzero(page+i);
+ if (!result)
+ BUG();
+#endif /* CONFIG_MMU */
+
if (order == 0)
free_hot_page(page);
else
--
Rongkai Zhan
next prev parent reply other threads:[~2005-01-21 3:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 13:34 [PATCH]: fix the bug of __free_pages() of mm/page_alloc.c zhan rongkai
2005-01-20 14:31 ` Russell King
2005-01-21 3:32 ` zhan rongkai
2005-01-21 3:40 ` zhan rongkai [this message]
2005-01-21 3:45 ` zhan rongkai
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=73e6204505012019406cf47f04@mail.gmail.com \
--to=zhanrk@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).