mm, thp: do not set PTE_SPECIAL for huge zero page 79/265079/3
authorSung-hun Kim <sfoon.kim@samsung.com>
Fri, 1 Oct 2021 04:06:07 +0000 (13:06 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Tue, 12 Oct 2021 05:25:39 +0000 (14:25 +0900)
commit60c6791df949e6ef790a63552e283a747f9d636d
treef64610cf5c323ce7cc1804d48972fb7d09deddc0
parent40422bc2e6cd14dc3c96f56f4b39937072607cfe
mm, thp: do not set PTE_SPECIAL for huge zero page

In previous version of the kernel, a huge zero page is remapped
to normal pte mappings with PTE_SPECIAL flag when the split of
hugepage is requested. It makes a buggy situation when the
kernel tries to find a page with vm_normal_page.

This patch resolves this problem by adding a condition to if-
statement.

Change-Id: I62946d3c3e92be309ccbe987f24a33503a7e23dc
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
mm/huge_memory.c