lkml.org 
[lkml]   [2006]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.16-rc1-mm3
Nick Piggin wrote:

> Thanks, it confirms my suspicions.
>
> Can you try the following patch, please?
> It appears the warnings were brought out by my improvement to
> the put_page_testzero debugging code (which previously did not
> check that we might be attempting to free a constituent compound
> page).
>
> Can you test the following patch please?
>

Sorry, wrong patch.

Note the warnings you are seeing should not result in memory
corruption, but will result in the given hugepage leaking.

--
SUSE Labs, Novell Inc.
Index: linux-2.6/include/linux/mm.h
===================================================================
--- linux-2.6.orig/include/linux/mm.h
+++ linux-2.6/include/linux/mm.h
@@ -294,6 +294,8 @@ struct page {
*/
static inline int put_page_testzero(struct page *page)
{
+ if (unlikely(PageCompound(page)))
+ page = (struct page *)page_private(page);
BUG_ON(atomic_read(&page->_count) == 0);
return atomic_dec_and_test(&page->_count);
}
\
 
 \ /
  Last update: 2006-01-26 20:52    [W:0.099 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site