Re: [Qemu-devel] [PATCH] linux-user: wrap fork() in a start/end exclusive section

2018-01-19 Thread Laurent Vivier
Le 07/12/2017 à 13:41, Peter Maydell a écrit : > When we do a fork() in usermode emulation, we need to be in > a start/end exclusive section, so that we can ensure that no > other thread is in an RCU section. Otherwise you can get this > deadlock: > > - fork thread: has mmap_lock, waits for rcu_sy

[Qemu-devel] [PATCH] linux-user: wrap fork() in a start/end exclusive section

2017-12-07 Thread Peter Maydell
When we do a fork() in usermode emulation, we need to be in a start/end exclusive section, so that we can ensure that no other thread is in an RCU section. Otherwise you can get this deadlock: - fork thread: has mmap_lock, waits for rcu_sync_lock (because rcu_init_lock() is registered as a pthre