* [Qemu-devel] [PATCH] target-arm: fix a segmentation fault due to illegal memory access
@ 2018-06-19 7:58 Zheng Xiang
2018-06-19 9:37 ` no-reply
2018-06-20 13:26 ` Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Xiang @ 2018-06-19 7:58 UTC (permalink / raw)
To: qemu-arm, qemu-devel; +Cc: zhaoshenglong, peter.maydell, Zheng Xiang
From: Zheng Xiang <xiang.zheng@linaro.org>
The elements of kvm_devices_head list are freed in kvm_arm_machine_init_done(),
but we still access these illegal memory in kvm_arm_devlistener_del().
This will cause segment fault when booting guest with MALLOC_PERTURB_=1.
Signed-off-by: Zheng Xiang <xiang.zheng@linaro.org>
---
target/arm/kvm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 98f5006..5bf41e1 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -256,6 +256,7 @@ static void kvm_arm_machine_init_done(Notifier *notifier, void *data)
kvm_arm_set_device_addr(kd);
}
memory_region_unref(kd->mr);
+ QSLIST_REMOVE_HEAD(&kvm_devices_head, entries);
g_free(kd);
}
memory_listener_unregister(&devlistener);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] target-arm: fix a segmentation fault due to illegal memory access
2018-06-19 7:58 [Qemu-devel] [PATCH] target-arm: fix a segmentation fault due to illegal memory access Zheng Xiang
@ 2018-06-19 9:37 ` no-reply
2018-06-20 13:26 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: no-reply @ 2018-06-19 9:37 UTC (permalink / raw)
To: zhengxiang9
Cc: famz, qemu-arm, qemu-devel, peter.maydell, xiang.zheng,
zhaoshenglong
Hi,
This series failed build test on s390x host. Please find the details below.
N/A. Internal error while reading log file
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] target-arm: fix a segmentation fault due to illegal memory access
2018-06-19 7:58 [Qemu-devel] [PATCH] target-arm: fix a segmentation fault due to illegal memory access Zheng Xiang
2018-06-19 9:37 ` no-reply
@ 2018-06-20 13:26 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2018-06-20 13:26 UTC (permalink / raw)
To: Zheng Xiang; +Cc: qemu-arm, QEMU Developers, Shannon Zhao, Zheng Xiang
On 19 June 2018 at 08:58, Zheng Xiang <zhengxiang9@huawei.com> wrote:
> From: Zheng Xiang <xiang.zheng@linaro.org>
>
> The elements of kvm_devices_head list are freed in kvm_arm_machine_init_done(),
> but we still access these illegal memory in kvm_arm_devlistener_del().
>
> This will cause segment fault when booting guest with MALLOC_PERTURB_=1.
>
> Signed-off-by: Zheng Xiang <xiang.zheng@linaro.org>
> ---
> target/arm/kvm.c | 1 +
> 1 file changed, 1 insertion(+)
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-20 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 7:58 [Qemu-devel] [PATCH] target-arm: fix a segmentation fault due to illegal memory access Zheng Xiang
2018-06-19 9:37 ` no-reply
2018-06-20 13:26 ` Peter Maydell
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).