From: Hugh Dickins Date: Wed, 19 Mar 2014 00:38:38 +0000 (-0700) Subject: mm: fix bad rss-counter if remap_file_pages raced migration X-Git-Tag: v3.14-rc8~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=887843961c4b4681ee993c36d4997bf4b4aa8253;p=pandora-kernel.git mm: fix bad rss-counter if remap_file_pages raced migration Fix some "Bad rss-counter state" reports on exit, arising from the interaction between page migration and remap_file_pages(): zap_pte() must count a migration entry when zapping it. And yes, it is possible (though very unusual) to find an anon page or swap entry in a VM_SHARED nonlinear mapping: coming from that horrid get_user_pages(write, force) case which COWs even in a shared mapping. Signed-off-by: Hugh Dickins Tested-by: Sasha Levin sasha.levin@oracle.com> Tested-by: Dave Jones davej@redhat.com> Cc: Cyrill Gorcunov Cc: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed