Skip to content

Commit c3b37c2

Browse files
ctmarinasMarc Zyngier
authored andcommitted
KVM: arm64: Pass the actual page address to mte_clear_page_tags()
Commit d77e59a ("arm64: mte: Lock a page for MTE tag initialisation") added a call to mte_clear_page_tags() in case a prior mte_copy_tags_from_user() failed in order to avoid stale tags in the guest page (it should have really been a separate commit). Unfortunately, the argument passed to this function was the address of the struct page rather than the actual page address. Fix this function call. Fixes: d77e59a ("arm64: mte: Lock a page for MTE tag initialisation") Signed-off-by: Catalin Marinas <[email protected]> Cc: Marc Zyngier <[email protected]> Reviewed-by: Oliver Upton <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent de535c0 commit c3b37c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/guest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ long kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm,
10791079

10801080
/* uaccess failed, don't leave stale tags */
10811081
if (num_tags != MTE_GRANULES_PER_PAGE)
1082-
mte_clear_page_tags(page);
1082+
mte_clear_page_tags(maddr);
10831083
set_page_mte_tagged(page);
10841084

10851085
kvm_release_pfn_dirty(pfn);

0 commit comments

Comments
 (0)