Re: [libvirt] [PATCH 1/3] libvirt: Increase connection reference count for callbacks

2013-03-27 Thread Peter Krempa
On 03/27/13 11:51, Daniel P. Berrange wrote: On Wed, Mar 27, 2013 at 11:16:26AM +0100, Peter Krempa wrote: On 03/26/13 10:54, Viktor Mihajlovski wrote: By adjusting the reference count of the connection object we prevent races between callback function and virConnectClose. Hum. Here I agree t

Re: [libvirt] [PATCH 1/3] libvirt: Increase connection reference count for callbacks

2013-03-27 Thread Daniel P. Berrange
On Wed, Mar 27, 2013 at 11:16:26AM +0100, Peter Krempa wrote: > On 03/26/13 10:54, Viktor Mihajlovski wrote: > >By adjusting the reference count of the connection object we > >prevent races between callback function and virConnectClose. > > Hum. Here I agree that this is definitely possible (and I

Re: [libvirt] [PATCH 1/3] libvirt: Increase connection reference count for callbacks

2013-03-27 Thread Peter Krempa
On 03/26/13 10:54, Viktor Mihajlovski wrote: By adjusting the reference count of the connection object we prevent races between callback function and virConnectClose. Hum. Here I agree that this is definitely possible (and I managed to reproduce the invalid read and possible memory corruption)

[libvirt] [PATCH 1/3] libvirt: Increase connection reference count for callbacks

2013-03-26 Thread Viktor Mihajlovski
By adjusting the reference count of the connection object we prevent races between callback function and virConnectClose. Signed-off-by: Viktor Mihajlovski --- src/libvirt.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/libvirt.c b/src/libvirt.c index 1624776..1aed2b4 100644 --

[libvirt] [PATCH 1/3] libvirt: Increase connection reference count for callbacks

2013-03-15 Thread Viktor Mihajlovski
By adjusting the reference count of the connection object we prevent races between callback function and virConnectClose. Signed-off-by: Viktor Mihajlovski --- src/libvirt.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/libvirt.c b/src/libvirt.c index 02d5dd9..f7df26a 100644 --