Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190196
b: refs/heads/master
c: 23be746
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Apr 24, 2010
1 parent ce66d2d commit d0d620f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a6a1ecd9e9b5d046a236da2f7eb6b6812f04229
refs/heads/master: 23be7468e8802a2ac1de6ee3eecb3ec7f14dc703
9 changes: 9 additions & 0 deletions trunk/include/linux/poison.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
#define POISON_FREE 0x6b /* for use-after-free poisoning */
#define POISON_END 0xa5 /* end-byte of poisoning */

/********** mm/hugetlb.c **********/
/*
* Private mappings of hugetlb pages use this poisoned value for
* page->mapping. The core VM should not be doing anything with this mapping
* but futex requires the existence of some page->mapping value even though it
* is unused if PAGE_MAPPING_ANON is set.
*/
#define HUGETLB_POISON ((void *)(0x00300300 + POISON_POINTER_DELTA + PAGE_MAPPING_ANON))

/********** arch/$ARCH/mm/init.c **********/
#define POISON_FREE_INITMEM 0xcc

Expand Down
5 changes: 4 additions & 1 deletion trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ static void free_huge_page(struct page *page)

mapping = (struct address_space *) page_private(page);
set_page_private(page, 0);
page->mapping = NULL;
BUG_ON(page_count(page));
INIT_LIST_HEAD(&page->lru);

Expand Down Expand Up @@ -2447,8 +2448,10 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
spin_lock(&inode->i_lock);
inode->i_blocks += blocks_per_huge_page(h);
spin_unlock(&inode->i_lock);
} else
} else {
lock_page(page);
page->mapping = HUGETLB_POISON;
}
}

/*
Expand Down

0 comments on commit d0d620f

Please sign in to comment.