[PATCH 5/9] rpc: add mising locking in virNetClientStreamRecvHole

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
 src/rpc/virnetclientstream.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c
index 65aa583..136ed16 100644
--- a/src/rpc/virnetclientstream.c
+++ b/src/rpc/virnetclientstream.c
@@ -644,8 +644,12 @@ virNetClientStreamRecvHole(virNetClientPtr client ATTRIBUTE_UNUSED,
         return -1;
     }
 
+    virObjectLock(st);
+
     *length = st->holeLength;
     st->holeLength = 0;
+
+    virObjectUnlock(st);
     return 0;
 }
 
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux