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:
c6a3405
)
kpagecount: add slab page checking because _mapcount is in a union
author
Petr Holasek
<
[email protected]
>
Thu, 13 Jan 2011 01:00:34 +0000
(17:00 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 13 Jan 2011 16:03:17 +0000
(08:03 -0800)
Add a PageSlab() check before adding the _mapcount value to /kpagecount.
page->_mapcount is in a union with the SLAB structure so for pages
controlled by SLAB, page_mapcount() returns nonsense.
Signed-off-by: Petr Holasek <
[email protected]
>
Cc: Wu Fengguang <
[email protected]
>
Cc: Matt Mackall <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/page.c
patch
|
blob
|
history
diff --git
a/fs/proc/page.c
b/fs/proc/page.c
index 3b8b456603318f1ff017056cdeda40129d559ab4..b06c674624e6af3691cbe00d51c7b1a2b5aa7a8a 100644
(file)
--- a/
fs/proc/page.c
+++ b/
fs/proc/page.c
@@
-40,7
+40,7
@@
static ssize_t kpagecount_read(struct file *file, char __user *buf,
ppage = pfn_to_page(pfn);
else
ppage = NULL;
- if (!ppage)
+ if (!ppage
|| PageSlab(ppage)
)
pcount = 0;
else
pcount = page_mapcount(ppage);