Commit 6e0b2055 authored by Miaohe Lin's avatar Miaohe Lin Committed by Tong Tiangen
Browse files

mm/migrate.c: fix potential indeterminate pte entry in migrate_vma_insert_page()

mainline inclusion
from mainline-v5.13-rc1
commit 34f5e9b9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8HVSL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34f5e9b9d1990d286199084efa752530ee3d8297

--------------------------------

If the zone device page does not belong to un-addressable device memory,
the variable entry will be uninitialized and lead to indeterminate pte
entry ultimately.  Fix this unexpected case and warn about it.

Link: https://lkml.kernel.org/r/20210325131524.48181-4-linmiaohe@huawei.com


Fixes: df6ad698 ("mm/device-public-memory: device memory cache coherent with CPU")
Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Rafael Aquini <aquini@redhat.com>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>

conflict:
	mm/migrate.c

Signed-off-by: default avatarTong Tiangen <tongtiangen@huawei.com>
parent 5854672e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment