* [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix
@ 2011-11-13 10:06 Avi Kivity
2011-11-13 10:06 ` [Qemu-devel] [PATCH 1.0 1/1] memory: fix 'info mtree' segfaults Avi Kivity
2011-11-13 10:08 ` [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Avi Kivity @ 2011-11-13 10:06 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Stefan Weil, Andreas Färber
Fix a segfault due to incorrect usage of QTAILQ_FOREACH_SAFE().
Avi Kivity (1):
memory: fix 'info mtree' segfaults
memory.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--
1.7.7.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1.0 1/1] memory: fix 'info mtree' segfaults
2011-11-13 10:06 [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
@ 2011-11-13 10:06 ` Avi Kivity
2011-11-13 10:08 ` [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2011-11-13 10:06 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Stefan Weil, Andreas Färber
'info mtree' accesses invalid memory in two cases, both due to incorrect
(and unsafe) usage of QTAILQ_FOREACH_SAFE().
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
---
memory.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/memory.c b/memory.c
index c0c1d12..7c20a07 100644
--- a/memory.c
+++ b/memory.c
@@ -1401,7 +1401,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
alias_print_queue);
}
- QTAILQ_FOREACH_SAFE(next_ml, &submr_print_queue, queue, ml) {
+ QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, queue, next_ml) {
g_free(ml);
}
}
@@ -1425,7 +1425,7 @@ void mtree_info(fprintf_function mon_printf, void *f)
}
QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) {
- g_free(ml2);
+ g_free(ml);
}
if (address_space_io.root &&
--
1.7.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix
2011-11-13 10:06 [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
2011-11-13 10:06 ` [Qemu-devel] [PATCH 1.0 1/1] memory: fix 'info mtree' segfaults Avi Kivity
@ 2011-11-13 10:08 ` Avi Kivity
2011-11-13 17:48 ` Anthony Liguori
1 sibling, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2011-11-13 10:08 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Stefan Weil, Andreas Färber
On 11/13/2011 12:06 PM, Avi Kivity wrote:
> Fix a segfault due to incorrect usage of QTAILQ_FOREACH_SAFE().
>
> Avi Kivity (1):
> memory: fix 'info mtree' segfaults
>
> memory.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
Gaaah. If it isn't generated by git request-pull, it's broken.
Please pull from:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent
to receive the fix above.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix
2011-11-13 10:08 ` [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
@ 2011-11-13 17:48 ` Anthony Liguori
0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2011-11-13 17:48 UTC (permalink / raw)
To: Avi Kivity; +Cc: Stefan Weil, qemu-devel, Andreas Färber
On 11/13/2011 04:08 AM, Avi Kivity wrote:
> On 11/13/2011 12:06 PM, Avi Kivity wrote:
>> Fix a segfault due to incorrect usage of QTAILQ_FOREACH_SAFE().
>>
>> Avi Kivity (1):
>> memory: fix 'info mtree' segfaults
>>
>> memory.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>
> Gaaah. If it isn't generated by git request-pull, it's broken.
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent
>
> to receive the fix above.
Pulled. Thanks.
Regards,
Anthony Liguori
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-13 17:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-13 10:06 [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
2011-11-13 10:06 ` [Qemu-devel] [PATCH 1.0 1/1] memory: fix 'info mtree' segfaults Avi Kivity
2011-11-13 10:08 ` [Qemu-devel] [PULL 1.0 0/1] 'info mtree' fix Avi Kivity
2011-11-13 17:48 ` Anthony Liguori
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).