From: Jorgen Hansen <jhansen@vmware.com>
To: <linux-kernel@vger.kernel.org>,
<virtualization@lists.linux-foundation.org>
Cc: <gregkh@linuxfoundation.org>, <pv-drivers@vmware.com>,
Jorgen Hansen <jhansen@vmware.com>
Subject: [PATCH] VMCI: Use set_page_dirty_lock() when unregistering guest memory
Date: Mon, 11 Jan 2021 04:18:55 -0800 [thread overview]
Message-ID: <1610367535-4463-3-git-send-email-jhansen@vmware.com> (raw)
In-Reply-To: <1610367535-4463-1-git-send-email-jhansen@vmware.com>
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.")
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
---
drivers/misc/vmw_vmci/vmci_queue_pair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c
index a3691c1..525ef96 100644
--- a/drivers/misc/vmw_vmci/vmci_queue_pair.c
+++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c
@@ -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;
--
2.6.2
next prev parent reply other threads:[~2021-01-11 12:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 12:18 [PATCH] VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC Jorgen Hansen
2021-01-11 12:18 ` [PATCH] VMCI: Stop log spew when qp allocation isn't possible Jorgen Hansen
2021-01-11 12:18 ` Jorgen Hansen [this message]
2021-01-11 12:46 ` [PATCH] VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC Greg KH
2021-01-11 14:05 ` Jorgen Hansen
2021-01-11 14:16 ` Greg KH
2021-01-11 15:45 ` kernel test robot
2021-01-18 11:27 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1610367535-4463-3-git-send-email-jhansen@vmware.com \
--to=jhansen@vmware.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox