From: Joshua Lant <joshualant@googlemail.com>
To: linux-cxl@vger.kernel.org
Cc: Jonathan.Cameron@huawei.com, Joshua Lant <joshualant@gmail.com>
Subject: [QEMU- PATCH v2 1/1] cxl_type3: fix segfault in cxl_destroy_dc_regions
Date: Mon, 8 Sep 2025 16:30:20 +0100 [thread overview]
Message-ID: <20250908154251.904229-2-joshualant@gmail.com> (raw)
In-Reply-To: <20250908154251.904229-1-joshualant@gmail.com>
CXL_TYPE3_CLASS() should be CXL_TYPE3_GET_CLASS() given object (CXLType3Dev)
input. Leads to segfault in object_class_dynamic_cast.
Fixes: ef73003556 (cxl_type3: add MHD callbacks)
Signed-off-by: Joshua Lant <joshualant@gmail.com>
---
hw/mem/cxl_type3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index c4658e0955..14cb09d9fe 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -919,7 +919,7 @@ static void cxl_destroy_dc_regions(CXLType3Dev *ct3d)
{
CXLDCExtent *ent, *ent_next;
CXLDCExtentGroup *group, *group_next;
- CXLType3Class *cvc = CXL_TYPE3_CLASS(ct3d);
+ CXLType3Class *cvc = CXL_TYPE3_GET_CLASS(ct3d);
int i;
CXLDCRegion *region;
--
2.43.7
prev parent reply other threads:[~2025-09-08 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 15:30 [QEMU- PATCH v2 0/1] cxl_type3: segfault in cxl_destroy_dc_regions Joshua Lant
2025-09-08 15:30 ` Joshua Lant [this message]
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=20250908154251.904229-2-joshualant@gmail.com \
--to=joshualant@googlemail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=joshualant@gmail.com \
--cc=linux-cxl@vger.kernel.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