Commit:     b9bae3402572dc50a1e084c5b1ae5117918ef0f0
Parent:     f1518a088bde6aea49e7c472ed6ab96178fcba3e
Author:     Hugh Dickins <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 21 23:27:45 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jun 21 15:55:12 2007 -0700

    page_mapping must avoid slub pages
    Nicolas Ferre reports oops from flush_dcache_page() on ARM when using
    SLUB: which reuses page->mapping as page->slab.  The page_mapping()
    function, used by ARM and PA-RISC flush_dcache_page() implementations,
    must not confuse SLUB pages with those which have page->mapping set.
    Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
    Cc: Nicolas Ferre <[EMAIL PROTECTED]>
    Cc: Christoph Lameter <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/mm.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index e4183c6..1c12074 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -603,6 +603,10 @@ static inline struct address_space *page_mapping(struct 
page *page)
        if (unlikely(PageSwapCache(page)))
                mapping = &swapper_space;
+       else if (unlikely(PageSlab(page)))
+               mapping = NULL;
        else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
                mapping = NULL;
        return mapping;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to