thp: fix MADV_DONTNEED vs clear soft dirty race
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 13 Apr 2017 21:56:28 +0000 (14:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Apr 2017 07:31:19 +0000 (09:31 +0200)
commit5c9d0832022959a8879e082c745281865f5336f0
tree3ee5cdb5e93ba379db3bbef96d8d5583d4a66cd2
parentf584803c49427ba9623adf93d7078cbe9775b027
thp: fix MADV_DONTNEED vs clear soft dirty race

commit 5b7abeae3af8c08c577e599dd0578b9e3ee6687b upstream.

Yet another instance of the same race.

Fix is identical to change_huge_pmd().

See "thp: fix MADV_DONTNEED vs.  numa balancing race" for more details.

Link: http://lkml.kernel.org/r/20170302151034.27829-5-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/task_mmu.c