Re: [libvirt] [PATCH] util: don't check for parallel iteration in hash-related functions

2018-04-10 Thread Vincent Bernat
❦ 6 avril 2018 12:01 +0200, Michal Privoznik  : > So I went through all callbacks (even transitive ones) and I've found > two problems: > > umlProcessAutoDestroyRun -> umlProcessAutoDestroyDom -> virHashRemoveEntry > > qemuDomainSnapshotDiscardAllMetadata ->

Re: [libvirt] [PATCH] util: don't check for parallel iteration in hash-related functions

2018-04-06 Thread Michal Privoznik
On 04/06/2018 09:56 AM, Vincent Bernat wrote: > This is the responsability of the caller to apply the correct lock > before using these functions. Moreover, the use of a simple boolean > was still racy: two threads may check the boolean and "lock" it > simultaneously. > > Users of functions from

[libvirt] [PATCH] util: don't check for parallel iteration in hash-related functions

2018-04-06 Thread Vincent Bernat
This is the responsability of the caller to apply the correct lock before using these functions. Moreover, the use of a simple boolean was still racy: two threads may check the boolean and "lock" it simultaneously. Users of functions from src/util/virhash.c have to be checked for correctness.