aboutsummaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2012-12-05 14:01:41 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-12-17 10:49:03 -0800
commit15487eba1006de0db3c8d9f78ef16700a4d0a217 (patch)
tree7bc4693fd4a4982e8c113dd3ac8c0631996d580d /Kconfig
parentd2e08635c22a9222f606062b42a7ad656f6a8584 (diff)
downloadkernel_samsung_smdk4412-15487eba1006de0db3c8d9f78ef16700a4d0a217.zip
kernel_samsung_smdk4412-15487eba1006de0db3c8d9f78ef16700a4d0a217.tar.gz
kernel_samsung_smdk4412-15487eba1006de0db3c8d9f78ef16700a4d0a217.tar.bz2
tmpfs: fix shared mempolicy leak
commit 18a2f371f5edf41810f6469cb9be39931ef9deb9 upstream. This fixes a regression in 3.7-rc, which has since gone into stable. Commit 00442ad04a5e ("mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()") changed get_vma_policy() to raise the refcount on a shmem shared mempolicy; whereas shmem_alloc_page() went on expecting alloc_page_vma() to drop the refcount it had acquired. This deserves a rework: but for now fix the leak in shmem_alloc_page(). Hugh: shmem_swapin() did not need a fix, but surely it's clearer to use the same refcounting there as in shmem_alloc_page(), delete its onstack mempolicy, and the strange mpol_cond_copy() and __mpol_cond_copy() - those were invented to let swapin_readahead() make an unknown number of calls to alloc_pages_vma() with one mempolicy; but since 00442ad04a5e, alloc_pages_vma() has kept refcount in balance, so now no problem. Reported-and-tested-by: Tommi Rantala <tt.rantala@gmail.com> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions