projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56c9cfb
)
hugetlb, rmap: add BUG_ON(!PageLocked) in hugetlb_add_anon_rmap()
author
Naoya Horiguchi
<
[email protected]
>
Fri, 10 Sep 2010 04:23:06 +0000
(13:23 +0900)
committer
Linus Torvalds
<
[email protected]
>
Fri, 24 Sep 2010 00:29:19 +0000
(17:29 -0700)
Confirming page lock is held in hugetlb_add_anon_rmap() may be useful
to detect possible future problems.
Signed-off-by: Naoya Horiguchi <
[email protected]
>
Acked-by: Rik van Riel <
[email protected]
>
Acked-by: Andrea Arcangeli <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/rmap.c
patch
|
blob
|
history
diff --git
a/mm/rmap.c
b/mm/rmap.c
index 2854857fd63b6894c3d50670daa9e12f27b13092..9d2ba01bd4f91d3db707524cc9bafd5e81f623b4 100644
(file)
--- a/
mm/rmap.c
+++ b/
mm/rmap.c
@@
-1582,6
+1582,8
@@
void hugepage_add_anon_rmap(struct page *page,
{
struct anon_vma *anon_vma = vma->anon_vma;
int first;
+
+ BUG_ON(!PageLocked(page));
BUG_ON(!anon_vma);
BUG_ON(address < vma->vm_start || address >= vma->vm_end);
first = atomic_inc_and_test(&page->_mapcount);