[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] io: remove mistaken call to object_ref on QTask
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] io: remove mistaken call to object_ref on QTask |
Date: |
Tue, 7 Jun 2016 08:51:26 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 06/07/2016 08:19 AM, Daniel P. Berrange wrote:
> The QTask struct is just a standalone struct, not a QOM Object,
> so calling object_ref() on it is not appropriate. This results
> in mangling the 'destroy' field in the QTask struct, causing
> the later call to qtask_free() to try to call the function
> at address 0x1, with predictably segfault happy results.
>
> There is in fact no need for ref counting with QTask, as the
> call to qtask_abort() or qtask_complete() will automatically
> free associated memory.
>
> This fixes the crash shown in
>
> https://bugs.launchpad.net/qemu/+bug/1589923
>
> Reported-by: Ben Aitchison <address@hidden>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> io/channel-websock.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature