On Thu, Jun 20, 2013 at 05:14:56PM +0800, liu ping fan wrote: > On Tue, Jun 18, 2013 at 8:41 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote: > > On Thu, Jun 13, 2013 at 05:03:03PM +0800, Liu Ping Fan wrote: > >> @@ -1109,6 +1146,7 @@ void net_cleanup(void) > >> qemu_del_net_client(nc); > >> } > >> } > >> + qemu_mutex_destroy(&net_clients_lock); > > > > Why is it okay to iterate over net_clients here without the lock? > > atexit(&net_cleanup); So no other racers exist.
What about dataplane? The device may not be reset when net_cleanup runs. It's best not to make assumptions, taking the lock is easy. Stefan