aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorMel Gorman <[email protected]>2012-12-05 22:01:41 +0000
committerLinus Torvalds <[email protected]>2012-12-06 19:56:43 +0000
commit18a2f371f5edf41810f6469cb9be39931ef9deb9 (patch)
tree4e4ec26f13273b36fc7203d2084ea09f14c5f0f7 /net/ipv4/tcp_output.c
parentmm: vmscan: do not keep kswapd looping forever due to individual uncompactabl... (diff)
downloadkernel-18a2f371f5edf41810f6469cb9be39931ef9deb9.tar.gz
kernel-18a2f371f5edf41810f6469cb9be39931ef9deb9.zip
tmpfs: fix shared mempolicy leak
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 <[email protected]> Signed-off-by: Mel Gorman <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions