Unverified Commit e9ed7f86 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5553 mm: ksm: fix use-after-free kasan report in ksm_might_need_to_copy

parents 1d1e27a9 5db09afe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2727,8 +2727,8 @@ struct page *ksm_might_need_to_copy(struct page *page,
			return page;	/* no need to copy it */
	} else if (!anon_vma) {
		return page;		/* no need to copy it */
	} else if (anon_vma->root == vma->anon_vma->root &&
		 page->index == linear_page_index(vma, address)) {
	} else if (page->index == linear_page_index(vma, address) &&
			anon_vma->root == vma->anon_vma->root) {
		return page;		/* still no need to copy it */
	}
	if (!PageUptodate(page))