diff options
| author | Ken Chen <[email protected]> | 2007-02-08 14:20:27 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-02-09 09:25:46 -0800 |
| commit | 6649a3863232eb2e2f15ea6c622bd8ceacf96d76 (patch) | |
| tree | c3b77d20afd1e7215186244375f6cdcaad94d4b2 /include/linux | |
| parent | f336953bfdee8d5e7f69cb8e080704546541f04b (diff) | |
[PATCH] hugetlb: preserve hugetlb pte dirty state
__unmap_hugepage_range() is buggy that it does not preserve dirty state of
huge_pte when unmapping hugepage range. It causes data corruption in the
event of dop_caches being used by sys admin. For example, an application
creates a hugetlb file, modify pages, then unmap it. While leaving the
hugetlb file alive, comes along sys admin doing a "echo 3 >
/proc/sys/vm/drop_caches".
drop_pagecache_sb() will happily free all pages that aren't marked dirty if
there are no active mapping. Later when application remaps the hugetlb
file back and all data are gone, triggering catastrophic flip over on
application.
Not only that, the internal resv_huge_pages count will also get all messed
up. Fix it up by marking page dirty appropriately.
Signed-off-by: Ken Chen <[email protected]>
Cc: "Nish Aravamudan" <[email protected]>
Cc: Adam Litke <[email protected]>
Cc: David Gibson <[email protected]>
Cc: William Lee Irwin III <[email protected]>
Cc: <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions