Re: [Qemu-devel] [PATCH v3 05/15] seqlock: use atomic writes for the sequence

2016-09-30 Thread Jonathan Neuschäfer
On Fri, Sep 30, 2016 at 11:45:19PM +0100, Alex Bennée wrote: > > Jonathan Neuschäfer writes: > > > On Fri, Sep 30, 2016 at 10:30:56PM +0100, Alex Bennée wrote: > >> From: Paolo Bonzini > >> > >> There is a data race if the sequence is written concurrently to the > >> read. In C11 this has unde

Re: [Qemu-devel] [PATCH v3 05/15] seqlock: use atomic writes for the sequence

2016-09-30 Thread Alex Bennée
Jonathan Neuschäfer writes: > On Fri, Sep 30, 2016 at 10:30:56PM +0100, Alex Bennée wrote: >> From: Paolo Bonzini >> >> There is a data race if the sequence is written concurrently to the >> read. In C11 this has undefined behavior. Use atomic_set; the >> read side is already using atomic_rea

Re: [Qemu-devel] [PATCH v3 05/15] seqlock: use atomic writes for the sequence

2016-09-30 Thread Jonathan Neuschäfer
On Fri, Sep 30, 2016 at 10:30:56PM +0100, Alex Bennée wrote: > From: Paolo Bonzini > > There is a data race if the sequence is written concurrently to the > read. In C11 this has undefined behavior. Use atomic_set; the > read side is already using atomic_read. > > Reported-by: Alex Bennée > S

[Qemu-devel] [PATCH v3 05/15] seqlock: use atomic writes for the sequence

2016-09-30 Thread Alex Bennée
From: Paolo Bonzini There is a data race if the sequence is written concurrently to the read. In C11 this has undefined behavior. Use atomic_set; the read side is already using atomic_read. Reported-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée --- include/qemu/se