- Add upstream patch to fix ref count of virNetServer object
9c77bf04-fix-virnetserver-refcnt.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=216
This commit is contained in:
parent
6765bcc4b6
commit
5a46bd028d
34
9c77bf04-fix-virnetserver-refcnt.patch
Normal file
34
9c77bf04-fix-virnetserver-refcnt.patch
Normal file
@ -0,0 +1,34 @@
|
||||
commit 9c77bf04b03ff026bb37212a195070d8983f530d
|
||||
Author: Hu Tao <hutao@cn.fujitsu.com>
|
||||
Date: Fri Jun 22 11:26:03 2012 +0800
|
||||
|
||||
fix a bug of ref count in virnetserver.c
|
||||
|
||||
The test of ref count is not protected by lock, which is unsafe because
|
||||
the ref count may have been changed by other threads during the test.
|
||||
|
||||
This patch fixes this.
|
||||
|
||||
Index: libvirt-0.9.11.4/src/rpc/virnetserver.c
|
||||
===================================================================
|
||||
--- libvirt-0.9.11.4.orig/src/rpc/virnetserver.c
|
||||
+++ libvirt-0.9.11.4/src/rpc/virnetserver.c
|
||||
@@ -794,15 +794,16 @@ void virNetServerQuit(virNetServerPtr sr
|
||||
void virNetServerFree(virNetServerPtr srv)
|
||||
{
|
||||
int i;
|
||||
+ int refs;
|
||||
|
||||
if (!srv)
|
||||
return;
|
||||
|
||||
virNetServerLock(srv);
|
||||
VIR_DEBUG("srv=%p refs=%d", srv, srv->refs);
|
||||
- srv->refs--;
|
||||
+ refs = --srv->refs;
|
||||
virNetServerUnlock(srv);
|
||||
- if (srv->refs > 0)
|
||||
+ if (refs > 0)
|
||||
return;
|
||||
|
||||
for (i = 0 ; i < srv->nservices ; i++)
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 22 16:26:01 MDT 2012 - jfehlig@suse.com
|
||||
|
||||
- Add upstream patch to fix ref count of virNetServer object
|
||||
9c77bf04-fix-virnetserver-refcnt.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 21 11:56:35 MDT 2012 - jfehlig@suse.com
|
||||
|
||||
|
@ -414,6 +414,7 @@ Source99: baselibs.conf
|
||||
Patch0: revert-d8978c90.patch
|
||||
Patch1: 57349ffc-lxc-ctrl.patch
|
||||
Patch2: 0dda594d-libvirtd-shutdown-deadlock.patch
|
||||
Patch3: 9c77bf04-fix-virnetserver-refcnt.patch
|
||||
# Need to go upstream
|
||||
Patch100: xen-name-for-devid.patch
|
||||
Patch101: clone.patch
|
||||
@ -552,6 +553,7 @@ Authors:
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch100 -p1
|
||||
%patch101
|
||||
%patch102 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user