]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mon, 27 Nov 2017 03:21:25 +0000 (06:21 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Nov 2017 20:26:29 +0000 (12:26 -0800)
commita8f97366452ed491d13cf1e44241bc0b5740b1f0
tree088b53c38a80b46fb6d46c49dc521dfa54e3a87b
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()

Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().

We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE.

The patch also changes touch_pud() in the same way.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c