Robert Foley writes:
> On Tue, 12 Nov 2019 at 12:36, Alex Bennée wrote:
>>
>>
>> > }
>> > +atomic_rcu_set(_logfile, logfile);
>> > }
>> > -qemu_mutex_unlock(_logfile_mutex);
>> > +logfile = qemu_logfile;
>>
>> Isn't this read outside of the protection of both
On Tue, 12 Nov 2019 at 12:36, Alex Bennée wrote:
>
>
> > }
> > +atomic_rcu_set(_logfile, logfile);
> > }
> > -qemu_mutex_unlock(_logfile_mutex);
> > +logfile = qemu_logfile;
>
> Isn't this read outside of the protection of both rcu_read_lock() and
> the mutex? Could
Robert Foley writes:
> This now allows changing the logfile while logging is active,
> and also solves the issue of a seg fault while changing the logfile.
>
> Any read access to the qemu_logfile handle will use
> the rcu_read_lock()/unlock() around the use of the handle.
> To fetch the handle
This now allows changing the logfile while logging is active,
and also solves the issue of a seg fault while changing the logfile.
Any read access to the qemu_logfile handle will use
the rcu_read_lock()/unlock() around the use of the handle.
To fetch the handle we will use atomic_rcu_read().
We