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

2018-04-11 Thread Vincent Bernat
❦ 10 avril 2018 08:27 +0200, 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. > >

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

2018-04-11 Thread Michal Privoznik
On 04/11/2018 11:01 AM, Vincent Bernat wrote: > ❦ 10 avril 2018 08:27 +0200, 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

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

2018-04-11 Thread Michal Privoznik
On 04/10/2018 08:27 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 v2] util: don't check for parallel iteration in hash-related functions

2018-04-10 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.