[PATCH] NetTestController: Fix race in _prepare_device()