Messages in this thread Patch in this message | | | From | Ralph Campbell <> | Subject | [PATCH] mm/hmm: Fix bad subpage pointer in try_to_unmap_one | Date | Tue, 9 Jul 2019 15:35:56 -0700 |
| |
When migrating a ZONE device private page from device memory to system memory, the subpage pointer is initialized from a swap pte which computes an invalid page pointer. A kernel panic results such as:
BUG: unable to handle page fault for address: ffffea1fffffffc8
Initialize subpage correctly before calling page_remove_rmap().
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Jérôme Glisse" <jglisse@redhat.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> --- mm/rmap.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/mm/rmap.c b/mm/rmap.c index e5dfe2ae6b0d..ec1af8b60423 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1476,6 +1476,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma, * No need to invalidate here it will synchronize on * against the special swap migration pte. */ + subpage = page; goto discard; } -- 2.20.1
| |