On Wed, Jan 29, 2020 at 05:34:22AM +0000, Bulekov, Alexander wrote: > The qtest-based fuzzer makes use of forking to reset-state between > tests. Keep the callback enabled, so the call_rcu thread gets created > within the child process. > > Signed-off-by: Alexander Bulekov <alx...@bu.edu> > --- > vl.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/vl.c b/vl.c > index bb77935f04..cf8e2d3ebb 100644 > --- a/vl.c > +++ b/vl.c > @@ -3794,7 +3794,14 @@ void qemu_init(int argc, char **argv, char **envp) > set_memory_options(&ram_slots, &maxram_size, machine_class); > > os_daemonize(); > - rcu_disable_atfork(); > + > + /* > + * If QTest is enabled, keep the rcu_atfork enabled, since system > processes > + * may be forked testing purposes (e.g. fork-server based fuzzing) > + */ > + if (!qtest_enabled()) { > + rcu_disable_atfork(); > + }
I haven't reviewed the details of whether resources are leaked across fork but in general it makes sense that we want an RCU thread in the fork child: Acked-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature