From: Mel Gorman <mgorman@suse.de>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org, linux-mm@kvack.org
Subject: [PATCH] mm: compaction: Fix return value of capture_free_page
Date: Mon, 26 Nov 2012 11:23:50 +0000 [thread overview]
Message-ID: <20121126112350.GI8218@suse.de> (raw)
In-Reply-To: <20121121192151.3FFE0A9A@kernel.stglabs.ibm.com>
On Wed, Nov 21, 2012 at 02:21:51PM -0500, Dave Hansen wrote:
>
> This needs to make it in before 3.7 is released.
>
This is also required. Dave, can you double check? The surprise is that
this does not blow up very obviously.
---8<---
From: Mel Gorman <mgorman@suse.de>
Subject: [PATCH] mm: compaction: Fix return value of capture_free_page
Commit ef6c5be6 (fix incorrect NR_FREE_PAGES accounting (appears like
memory leak)) fixes a NR_FREE_PAGE accounting leak but missed the return
value which was also missed by this reviewer until today. That return value
is used by compaction when adding pages to a list of isolated free
pages and without this follow-up fix, there is a risk of free list
corruption.
Signed-off-by: Mel Gorman <mgorman@suse.de>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bcb72c6..8193809 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1422,7 +1422,7 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype)
}
}
- return 1UL << order;
+ return 1UL << alloc_order;
}
/*
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-11-26 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 19:21 [PATCH] [3.7-rc] fix incorrect NR_FREE_PAGES accounting (appears like memory leak) Dave Hansen
2012-11-26 11:23 ` Mel Gorman [this message]
2012-11-26 15:06 ` [PATCH] mm: compaction: Fix return value of capture_free_page Dave Hansen
2012-11-27 11:07 ` Mel Gorman
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=20121126112350.GI8218@suse.de \
--to=mgorman@suse.de \
--cc=akpm@osdl.org \
--cc=dave@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.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).