]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
mm/migrate.c: fix potential indeterminate pte entry in migrate_vma_insert_page()
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 5 May 2021 01:37:10 +0000 (18:37 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 13:02:14 +0000 (15:02 +0200)
commitbc8e6c696890845d89aa3b3646b18812a0959a25
tree6e7d9c642342655facaa41e7d8632c38760e6afd
parenta43004794d3346bbb594531d6acfc04410178e6c
mm/migrate.c: fix potential indeterminate pte entry in migrate_vma_insert_page()

BugLink: https://bugs.launchpad.net/bugs/1930474
[ Upstream commit 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: df6ad69838fc ("mm/device-public-memory: device memory cache coherent with CPU")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
mm/migrate.c