Skip to contentSkip to conversation

VMCI: Use set_page_dirty_lock() when unregistering guest memory

PATCH In review Jorgen Hansen 1 participant 1 message Jan 20, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/3 VMCI: Use set_page_dirty_lock() when unregistering guest memory

When the VMCI host support releases guest memory in the case where the VM was killed, the pinned guest pages aren't locked. Use set_page_dirty_lock() instead of set_page_dirty().

Testing done: Killed VM while having an active VMCI based vSocket connection and observed warning from ext4. With this fix, no warning was observed. Ran various vSocket tests without issues.

Fixes 06164d2b72aa ("VMCI: queue pairs implementation.")
---
 drivers/misc/vmw_vmci/vmci_queue_pair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/vmw_vmci/vmci_queue_pair.c +1 -1
index a3691c1..525ef96 100644
@@ -630,7 +630,7 @@ static void qp_release_pages(struct page **pages,
 
 	for (i = 0; i < num_pages; i++) {
 		if (dirty)
-			set_page_dirty(pages[i]);
+			set_page_dirty_lock(pages[i]);
 
 		put_page(pages[i]);
 		pages[i] = NULL;
Signature · 6 lines
2.6.2

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization