- 01 7月, 2011 23 次提交
-
-
由 Eric Blake 提交于
EXTRA_DIST files should unconditionally be part of the tarball, rather than depending on the presence of sanlock-devel. Meanwhile, parallel builds could fail if we don't use mkdir -p. * src/Makefile.am (EXTRA_DIST): Always ship sanlock .aug and template .conf files. (%-sanlock.conf): Use MKDIR_P.
-
由 Eric Blake 提交于
For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front. * cfg.mk (sc_po_check): Add prerequisites.
-
由 Eric Blake 提交于
* .gitignore: Exempt jsontest binary.
-
由 Daniel P. Berrange 提交于
* daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and suitable function stubs to allow build without SASL
-
由 Eric Blake 提交于
Based on Coverity's finding on the previous patch, I audited gnulib's pipe2 code and found that we had the potential for a subtle double-close bug, unless gnulib guarantees that the contents of the fd array are unchanged on pipe2() failure. * .gnulib: Update to latest, for pipe2 fix.
-
由 Eric Blake 提交于
Detected by Coverity. Both are instances of bad things happening if pipe2 fails; the virNetClientNew failure could free garbage, and virNetSocketNewConnectCommand could close random fds. Note: POSIX doesn't guarantee the contents of fd[0] and fd[1] after pipe failure: http://austingroupbugs.net/view.php?id=467 We may need to introduce a virPipe2 wrapper that guarantees that on pipe failure, the fds are explicitly set to -1, rather than our current state of assuming the fds are unchanged from their value prior to the failed pipe call. * src/rpc/virnetclient.c (virNetClientNew): Initialize variable. * src/rpc/virnetsocket.c (virNetSocketNewConnectCommand): Likewise.
-
由 Eric Blake 提交于
Detected by Coverity; neither vshCmddefHelp nor vshCmdOptParse was initializing opts_required. * tools/virsh.c (vshCmddefOptParse): Always initialize bitmaps.
-
由 Eric Blake 提交于
Detected by Coverity. info.nrVirtCpu is unsigned short, but if cpumaplen is int, then the product of the two in vshMalloc risks unintended sign extension. cmdVcpuinfo had already solved this by using size_t cpumaplen. * tools/virsh.c (cmdVcpuPin): Use correct type.
-
由 Daniel P. Berrange 提交于
The virDomainMigratePrepareTunnel3 impl in the remote driver was using the procedure number for the virDomainMigratePrepareTunnel method. This doesn't work out so well, because it makes the server ignore & drop all stream packets * src/remote/remote_driver.c: Fix procedure for PrepareTunnel3
-
由 Daniel P. Berrange 提交于
We ignore any stream data packets which come in for streams which are not registered, since these packets are async and do not have a reply. If we get a stream control packet though we must send back an actual error, otherwise a (broken) client may hang forever making it hard to diagnose the client bug. * src/rpc/virnetserverprogram.c: Send back error for unexpected stream control messages
-
由 Daniel P. Berrange 提交于
If a message packet for a invalid stream is received it is just free'd. This is not good because it doesn't let the client RPC request counter decrement. If a stream is shutdown with pending packets the message also isn't released properly because of an incorrect header type * daemon/stream.c: Fix message header type * src/rpc/virnetserverprogram.c: Send dummy reply instead of free'ing ignored stream message
-
由 Daniel P. Berrange 提交于
virNetSocketFree uses kill(SIGTERM) so we must include signal.h for the definitions * src/rpc/virnetsocket.c: Include signal.h
-
由 Daniel P. Berrange 提交于
While investigating some memory leaks it was unclear whether the JSON code correctly free'd all memory during parsing. Add a test case which can be run under valgrind to clearly demonstrate that the parser is leak free. * tests/Makefile.am: Add 'jsontest' * tests/jsontest.c: A few simple JSON parsing tests
-
由 Daniel P. Berrange 提交于
The qemudDomainSaveFlag method will call EndJob on the 'vm' object it is passed in. This can result in the 'vm' object being free'd if the last reference is removed. Thus no caller of 'qemudDomainSaveFlag' must *ever* reference 'vm' again upon return. Unfortunately qemudDomainSave and qemuDomainManagedSave both call 'virDomainObjUnlock', which can result in a crash. This is non-deterministic since it involves a race with the monitor I/O thread. Fix this by making qemudDomainSaveFlag responsible for calling virDomainObjUnlock instead. * src/qemu/qemu_driver.c: Fix potential use after free when saving guests
-
由 Daniel P. Berrange 提交于
The 'char control[CMSG_SPACE(sizeof(int))];' was not being wiped, so could potentially contain uninitialized bytes. While this was harmless in this case, it caused complaints from valgrind * src/qemu/qemu_monitor.c: memset 'control' variable in qemuMonitorIOWriteWithFD
-
由 Daniel P. Berrange 提交于
The event handler functions do not free the virJSONValuePtr object. Every event received from a VM thus caused a memory leak * src/qemu/qemu_monitor_json.c: Fix leak of event object
-
由 Daniel P. Berrange 提交于
* src/util/json.c: Remove warning message
-
由 Daniel P. Berrange 提交于
The 'function' field in the PCI address was not correctly initialized, so it was building the wrong address address string and so not removing all functions from the in use list. * src/qemu/qemu_command.c: Fix initialization of PCI function
-
由 Daniel P. Berrange 提交于
When adding a callback to an FD stream, we take an extra reference on the virStreamPtr instance. We forgot to registered a free function with the callback, so when the callback was removed, the extra reference held on virStreamPtr was not released. * src/fdstream.c: Use a free callback to release reference on virStreamPtr when removing callback
-
由 Daniel P. Berrange 提交于
* src/rpc/virnetserver.c: Free mdnsGroupName
-
由 Daniel P. Berrange 提交于
The stream code was reusing a stream message object before it was removed from the linked list of filtered messages. This caused any later queued messages to be completely lost. * daemon/stream.c: Delay reuse of stream message until after it is removed from the queue
-
由 Daniel P. Berrange 提交于
To save on memory reallocation, virNetMessage instances that have been transmitted, may be reused for a subsequent incoming message. We forgot to clear out the old data of the message fully, which caused later confusion upon read. * src/rpc/virnetserverclient.c: memset entire message before reusing it
-
由 Daniel P. Berrange 提交于
The virNetServerClient object had a hardcoded limit of 10 requests per client. Extend constructor to allow it to be passed in as a configurable variable. Wire this up to the 'max_client_requests' config parameter in libvirtd * daemon/libvirtd.c: Pass max_client_requests into services * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Pass nrequests_client_max to clients * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h: Allow configurable request limit
-
- 30 6月, 2011 5 次提交
-
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
It doesn't generate "<name>" and "<format>" nodes for "<source>" even if they are explicitly specified. This patch fixes it.
-
由 Wen Congyang 提交于
If we pass VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG to qemuGetSchedulerParametersFlags() or *nparams is less than 1, we will unlock qemu_driver without locking it. It's very dangerous. We should lock qemu_driver after calling virCheckFlags().
-
由 Wen Congyang 提交于
We should save domain status after modifing vcpupin. If not, we will get wrong vcpupin information after rebooting libvirtd.
-
由 Wen Congyang 提交于
virDomainVcpuPinDefFree() does not free def->cputune.vcpupin if nvcpupin is 0, and does not set def->cputune.vcpupin to NULL. If we set nvcpupin to 0 but do not free vcpupin, vcpupin will not be freed when vm->def is freed. Use VIR_FREE() instead of virDomainVcpuPinDefFree() to free the memory and set def->cputune.vcpupint to NULL.
-
- 29 6月, 2011 12 次提交
-
-
由 Eric Blake 提交于
virt-sanlock-cleanup.8 has static contents (no dependency on configure), but is generated by pod2man (a perl dependency that maintainers must have, but which ordinary tarball users need not have). Therefore, ensure that it is always part of the tarball, even though it is only conditionally installed. This is similar to commit 6db98a2d, but made simpler by the fact that the .8 page is static content. * tools/Makefile.am (EXTRA_DIST): Add virt-sanlock-cleanup.8.
-
由 Minoru Usui 提交于
If virSysinfoParse{BIOS,System,Processor,Memory}() can't find newline('\n'), these return NULL. This patch fixes this. Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
由 Daniel P. Berrange 提交于
When the remote client receives end of file on the stream it never invokes the stream callback. Applications relying on async event driven I/O will thus never see the EOF condition on the stream * src/rpc/virnetclient.c, src/rpc/virnetclientstream.c: Ensure EOF is dispatched
-
由 Daniel P. Berrange 提交于
The client stream object can be used independently of the virNetClientPtr object, so must have full locking of its own and not rely on any caller. * src/remote/remote_driver.c: Remove locking around stream callback * src/rpc/virnetclientstream.c: Add locking to all APIs and callbacks
-
由 Daniel P. Berrange 提交于
* src/rpc/virnetclientstream.c: Avoid referencing NULL
-
由 Daniel P. Berrange 提交于
When a filter steals an RPC message, that message must not be freed, except by the filter code itself * src/rpc/virnetserverclient.c: Don't free stolen RPC messages
-
由 Daniel P. Berrange 提交于
Improve log messages issued when encountering a bogus message length to include the actual length and the limit violated * src/rpc/virnetmessage.c: Improve log messages
-
由 Daniel P. Berrange 提交于
On stream completion it is neccessary to send back a message with an empty payload. The message header was not being filled out correctly, since we were not writing any payload. Add a method for encoding an empty payload which updates the message headers correctly. * src/rpc/virnetmessage.c, src/rpc/virnetmessage.h: Add a virNetMessageEncodePayloadEmpty method * src/rpc/virnetserverprogram.c: Write empty payload on stream completion
-
由 Daniel P. Berrange 提交于
The RPC client treats failure to register a socket watch as non-fatal, since we do not mandate that a libvirt client application provide an event loop implementation. It is thus inappropriate to a log a message at VIR_LOG_WARN * src/rpc/virnetsocket.c: Lower logging level
-
由 Daniel P. Berrange 提交于
If a streams error is raised, virNetClientIOEventLoop returns 0, but an error is set. Check for this and propagate it if present * src/rpc/virnetclient.c: Propagate streams error
-
由 Daniel P. Berrange 提交于
If a callback being invoked from a stream issues a virStreamAbort operation, the stream data will be free'd but the callback will then still try to use this. Delay free'ing of the stream data when a callback is dispatching * src/fdstream.c: Delay stream free when callback is active
-
由 Michal Privoznik 提交于
Although we create a temporary file, it is owned by root:root and have rights 0600. In case qemu does not run under root, it is unable to write to that file and thus we transfer 0B sized file.
-