]> xenbits.xensource.com Git - libvirt.git/commit
rpc,lockd: Add missing netserver refcount increment on reload
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Tue, 24 Oct 2017 10:47:36 +0000 (13:47 +0300)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 6 Nov 2017 21:19:11 +0000 (16:19 -0500)
commit47eb77fb33b3b2c1485cafb606402826169b42fa
tree95c03c212ad24da35e938ba3a581895df6f2901d
parent82fa7fc3ab5a2dd6af22c7addbe451f825105c96
rpc,lockd: Add missing netserver refcount increment on reload

After the virNetDaemonAddServerPostExec call in virtlogd we should have
netserver refcount set to 2. One goes to netdaemon servers hashtable
and one goes to virt{logd,lock} own reference to netserver. Let's add
the missing increment in virNetDaemonAddServerPostExec itself while
holding the daemon lock.

Since lockd defers management of the @srv object by the presence
in the hash table, virLockDaemonNewPostExecRestart must Unref the
alloc'd Ref on the @srv object done as part of virNetDaemonAddServerPostExec
and virNetServerNewPostExecRestart processing. The virNetDaemonGetServer
in lock_daemon main will also take a reference which is Unref'd during
main cleanup.
src/locking/lock_daemon.c
src/rpc/virnetdaemon.c