Skip to contentSkip to conversation

Merge qio-next 2016-08-03

GIT PULL Applied Daniel P. Berrange 2 participants 3 messages Aug 3, 2016

lore
Share & tools
lore
#0 lore raw

The following changes since commit 8b54a6a6c63dc84f2744f6b125c1a6c5a16ee10b:

Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging (2016-08-02 12:55:12 +0100)

are available in the git repository at:

git://github.com/berrange/qemu tags/pull-qio-next-2016-08-03-v1

for you to fetch changes up to bc35d51077b33e68a0ab10a057f352747214223f:

io: remove mistaken call to object_ref on QTask (2016-08-03 10:28:50 +0100)

----------------------------------------------------------------
Merge qio-next 2016-08-03 v1

----------------------------------------------------------------
Daniel P. Berrange (1):
io: remove mistaken call to object_ref on QTask

 io/channel-websock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

[Qemu-devel] [PULL v1] io: remove mistaken call to object_ref on QTask

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

---
 io/channel-websock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
io/channel-websock.c +1 -2
index 239c75a..533bd4b 100644
@@ -317,14 +317,13 @@ static gboolean qio_channel_websock_handshake_io(QIOChannel *ioc,
         return TRUE;
     }
 
-    object_ref(OBJECT(task));
     trace_qio_channel_websock_handshake_reply(ioc);
     qio_channel_add_watch(
         wioc->master,
         G_IO_OUT,
         qio_channel_websock_handshake_send,
         task,
-        (GDestroyNotify)object_unref);
+        NULL);
     return FALSE;
 }
 
Signature · 1 line
2.7.4
#2 lore raw
In reply to Daniel P. Berrange
Quoted 10 lines · Daniel P. Berrange

The following changes since commit 8b54a6a6c63dc84f2744f6b125c1a6c5a16ee10b:

Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging (2016-08-02 12:55:12 +0100)

are available in the git repository at:

git://github.com/berrange/qemu tags/pull-qio-next-2016-08-03-v1

for you to fetch changes up to bc35d51077b33e68a0ab10a057f352747214223f:

Quoted 8 lines

io: remove mistaken call to object_ref on QTask (2016-08-03 10:28:50 +0100)

----------------------------------------------------------------
Merge qio-next 2016-08-03 v1

----------------------------------------------------------------
Daniel P. Berrange (1):
io: remove mistaken call to object_ref on QTask

Applied, thanks.

-- PMM