BUG?: PAGE_FLAGS_CHECK_AT_PREP seems to be cleared too early (WasRe: I just got got another Oops

From: KAMEZAWA Hiroyuki
Date: Mon Mar 16 2009 - 04:05:50 EST


Hi,
I'm sorry if I miss something..

>From this patch
==
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=79f4b7bf393e67bbffec807cc68caaefc72b82ee
==
#define PAGE_FLAGS_CHECK_AT_PREP ((1 << NR_PAGEFLAGS) - 1)
...
@@ -468,16 +467,16 @@ static inline int free_pages_check(struct page *page)
(page_count(page) != 0) |
(page->flags & PAGE_FLAGS_CHECK_AT_FREE)))
....
+ if (PageReserved(page))
+ return 1;
+ if (page->flags & PAGE_FLAGS_CHECK_AT_PREP)
+ page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
+ return 0;
}
==

PAGE_FLAGS_CHECK_AT_PREP is cleared by free_pages_check().

This means PG_head/PG_tail(PG_compound) flags are cleared here and Compound page
will never be freed in sane way.

Regards,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/