> Will we do the same in vhost-net? If yes, all the callers will call > vhost_init_device_iotlb() with dev.iotlb NULL, so should we remove > that behaviour and add the check we are adding here inside the > vhost_init_device_iotlb()? > > Or there is an use case where vhost_init_device_iotlb() is called with > an already initialized dev.iotlb ?
I will check whether there is any valid use case for calling vhost_init_device_iotlb() with an already initialized dev->iotlb. If there is no such use case, I will move the check into vhost_init_device_iotlb() and apply the same change to vhost-net as well. Thanks, Jia

