android_kernel_xiaomi_sm7250/mm
Ken Chen 6649a38632 [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 <kenchen@google.com>
Cc: "Nish Aravamudan" <nish.aravamudan@gmail.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: <stable@kernel.org>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:25:46 -08:00
..
allocpercpu.c
backing-dev.c
bootmem.c [PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols 2006-12-07 08:39:44 -08:00
bounce.c [PATCH] blktrace: only add a bounce trace when we really bounce 2007-01-12 10:46:49 -08:00
fadvise.c [PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path 2006-12-08 08:28:43 -08:00
filemap_xip.c [PATCH] mm: mremap correct rmap accounting 2007-01-30 08:33:32 -08:00
filemap.c [PATCH] mm: remove find_trylock_page 2007-02-09 08:06:14 -08:00
filemap.h
fremap.c [PATCH] mm: more rmap debugging 2006-12-22 08:55:49 -08:00
highmem.c
hugetlb.c [PATCH] hugetlb: preserve hugetlb pte dirty state 2007-02-09 09:25:46 -08:00
internal.h
Kconfig
madvise.c
Makefile
memory_hotplug.c [PATCH] Fix sparsemem on Cell 2007-01-11 18:18:20 -08:00
memory.c [PATCH] i386 vDSO: use VM_ALWAYSDUMP 2007-01-26 13:50:58 -08:00
mempolicy.c [PATCH] mbind: restrict nodes to the currently allowed cpuset 2007-01-23 07:52:06 -08:00
mempool.c
migrate.c
mincore.c [PATCH] sys_mincore: s/max/min/ 2006-12-17 10:21:53 -08:00
mlock.c
mmap.c [PATCH] Don't allow the stack to grow into hugetlb reserved regions 2007-01-30 16:01:35 -08:00
mmzone.c [PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols 2006-12-07 08:39:44 -08:00
mprotect.c
mremap.c [PATCH] mm: mremap correct rmap accounting 2007-01-30 08:33:32 -08:00
msync.c
nommu.c [PATCH] struct path: convert mm 2006-12-08 08:28:47 -08:00
oom_kill.c [PATCH] fix OOM killing of swapoff 2007-01-05 23:55:29 -08:00
page_alloc.c Revert "[PATCH] mm: micro optimise zone_watermark_ok" 2007-01-31 16:46:40 -08:00
page_io.c
page-writeback.c Fix balance_dirty_page() calculations with CONFIG_HIGHMEM 2007-01-29 16:37:38 -08:00
pdflush.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
prio_tree.c
readahead.c [PATCH] io-accounting-read-accounting nfs fix 2006-12-10 09:55:41 -08:00
rmap.c [PATCH] page_mkclean_one(): fix call to set_pte_at() 2006-12-30 10:56:42 -08:00
shmem_acl.c
shmem.c [PATCH] Fix for shmem_truncate_range() BUG_ON() 2006-12-22 08:55:47 -08:00
slab.c [PATCH] fix BUG_ON(!PageSlab) from fallback_alloc 2007-01-05 23:55:23 -08:00
slob.c [PATCH] MM: SLOB is broken by recent cleanup of slab.h 2006-12-30 10:56:42 -08:00
sparse.c
swap_state.c
swap.c [PATCH] hotplug CPU: clean up hotcpu_notifier() use 2006-12-07 08:39:39 -08:00
swapfile.c [PATCH] swsusp: Do not fail if resume device is not set 2007-01-05 23:55:22 -08:00
thrash.c
tiny-shmem.c [PATCH] struct path: convert mm 2006-12-08 08:28:47 -08:00
truncate.c [PATCH] MM: Remove [PATCH] invalidate_inode_pages2_range() debug 2007-01-26 13:51:00 -08:00
util.c
vmalloc.c
vmscan.c [PATCH] shrink_all_memory(): fix lru_pages handling 2007-01-05 23:55:29 -08:00
vmstat.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00