Skip to content

Commit

Permalink
VMCI: Use set_page_dirty_lock() when unregistering guest memory
Browse files Browse the repository at this point in the history
[ Upstream commit 5a16c53 ]

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: 06164d2 ("VMCI: queue pairs implementation.")
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Link: https://lore.kernel.org/r/1611160360-30299-1-git-send-email-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Jorgen Hansen authored and gregkh committed Mar 4, 2021
1 parent 6a96a44 commit 6b34aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/vmw_vmci/vmci_queue_pair.c
Expand Up @@ -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;
Expand Down

0 comments on commit 6b34aa5

Please sign in to comment.