Re: [libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

2017-04-24 Thread Michal Privoznik
On 04/18/2017 03:55 AM, Yi Wang wrote: ka maybe have been freeed in virObjectUnref, application using virKeepAliveTimer will segfault when unlock ka. We should keep ka's refs positive before using it. Signed-off-by: Yi Wang --- src/rpc/virkeepalive.c | 11 --- 1 file changed, 4 inserti

Re: [libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

2017-04-24 Thread Daniel P. Berrange
On Mon, Apr 24, 2017 at 11:15:31AM +0200, Michal Privoznik wrote: > On 04/24/2017 05:31 AM, wang.y...@zte.com.cn wrote: > > Hi Michal, > > > > > > > > Thanks for your review. The problem occured in a python applicatin using > > libvirt-python, which has no ref(). If we unref() first in > > vi

Re: [libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

2017-04-24 Thread Michal Privoznik
On 04/24/2017 05:31 AM, wang.y...@zte.com.cn wrote: Hi Michal, Thanks for your review. The problem occured in a python applicatin using libvirt-python, which has no ref(). If we unref() first in virKeepAliveTimer, we may get a segfault in virObjectUnlock() when cleanup, so I suppose that my

Re: [libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

2017-04-23 Thread wang.yi59
>LiuJianJun10033482 Date: 2017/04/20 20:40 Subject: Re: [libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault On 04/18/2017 03:55 AM, Yi Wang wrote: > ka maybe have been freeed in virObjectUnref, application using > virKeepAliveTimer will segfault when unlock ka. We should keep > ka's refs pos

Re: [libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

2017-04-20 Thread Michal Privoznik
On 04/18/2017 03:55 AM, Yi Wang wrote: ka maybe have been freeed in virObjectUnref, application using virKeepAliveTimer will segfault when unlock ka. We should keep ka's refs positive before using it. Signed-off-by: Yi Wang --- src/rpc/virkeepalive.c | 11 --- 1 file changed, 4 inserti

[libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

2017-04-18 Thread Yi Wang
ka maybe have been freeed in virObjectUnref, application using virKeepAliveTimer will segfault when unlock ka. We should keep ka's refs positive before using it. Signed-off-by: Yi Wang --- src/rpc/virkeepalive.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/