forked from pool/libvirt
Fix VNC port reservation race in qemu driver
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=79
This commit is contained in:
parent
ec7231cd22
commit
d0b1be4418
27
c58b1056-init-bitmap-size.patch
Normal file
27
c58b1056-init-bitmap-size.patch
Normal file
@ -0,0 +1,27 @@
|
||||
commit c58b105625acf3404d75376b070903139e3346a3
|
||||
Author: Jim Fehlig <jfehlig@novell.com>
|
||||
Date: Wed Dec 22 11:15:32 2010 -0700
|
||||
|
||||
Set bitmap size when allocating a bitmap
|
||||
|
||||
I began noticing a race when reserving VNC ports as described here
|
||||
|
||||
https://www.redhat.com/archives/libvir-list/2010-November/msg00379.html
|
||||
|
||||
Turns out that we were not initializing the size field of bitmap
|
||||
struct when allocating the bitmap. This subsequently caused
|
||||
virBitmapSetBit() to fail since bitmap->size is 0, hence we never
|
||||
actually reserved the port.
|
||||
|
||||
diff --git a/src/util/bitmap.c b/src/util/bitmap.c
|
||||
index 1b0c9da..9741668 100644
|
||||
--- a/src/util/bitmap.c
|
||||
+++ b/src/util/bitmap.c
|
||||
@@ -73,6 +73,7 @@ virBitmapPtr virBitmapAlloc(size_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ bitmap->size = size;
|
||||
return bitmap;
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 22 14:41:46 MST 2010 - jfehlig@novell.com
|
||||
|
||||
- Fix VNC port reservation race in qemu driver
|
||||
c58b1056-init-bitmap-size.patch
|
||||
bnc#659431
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 10 16:31:02 MDT 2010 - jfehlig@novell.com
|
||||
|
||||
|
@ -171,6 +171,7 @@ Source1: libvirtd.init
|
||||
# Upstream patches
|
||||
Patch0: 45147ca3-macvtap-warning.patch
|
||||
Patch1: 474b1c14-macvtap-undefined.patch
|
||||
Patch2: c58b1056-init-bitmap-size.patch
|
||||
# Need to go upstream
|
||||
Patch100: xen-name-for-devid.patch
|
||||
Patch102: clone.patch
|
||||
@ -284,6 +285,7 @@ Authors:
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch100 -p1
|
||||
%patch102
|
||||
%patch103 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user