From: Zhenzhong Duan <zhenzhong.duan@intel.com>
To: qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, clg@redhat.com,
eric.auger@redhat.com, steven.sistare@oracle.com
Subject: [PATCH 5/5] accel/kvm: Fix SIGSEGV when execute "query-balloon" after CPR transfer
Date: Thu, 25 Sep 2025 22:25:40 -0400 [thread overview]
Message-ID: <20250926022540.1884023-1-zhenzhong.duan@intel.com> (raw)
After CPR transfer, source QEMU close kvm fd and free kvm_state,
"query-balloon" will check kvm_state->sync_mmu and trigger NULL
pointer reference.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
accel/kvm/kvm-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 9060599cd7..a3e2d11763 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -3479,7 +3479,7 @@ int kvm_device_access(int fd, int group, uint64_t attr,
bool kvm_has_sync_mmu(void)
{
- return kvm_state->sync_mmu;
+ return kvm_state && kvm_state->sync_mmu;
}
int kvm_has_vcpu_events(void)
--
2.47.1
next reply other threads:[~2025-09-26 2:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 2:25 Zhenzhong Duan [this message]
2025-09-26 4:48 ` [PATCH 5/5] accel/kvm: Fix SIGSEGV when execute "query-balloon" after CPR transfer Markus Armbruster
2025-09-26 13:17 ` Steven Sistare
2025-09-28 8:13 ` Duan, Zhenzhong
2025-09-29 4:32 ` Markus Armbruster
2025-09-26 13:19 ` Steven Sistare
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=20250926022540.1884023-1-zhenzhong.duan@intel.com \
--to=zhenzhong.duan@intel.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=eric.auger@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=steven.sistare@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).