On Tue, Mar 09, 2021 at 05:38:44PM -0400, Jason Gunthorpe wrote: > The pattern also makes it clear that vfio_register_group_dev() must be > last in the sequence, as once it is called the core code can immediately > start calling ops. The init/register gap is provided to allow for the > driver to do setup before ops can be called and thus avoid races. Yes, APIs that init and register together are generatelly a rather bad idea. Reviewed-by: Christoph Hellwig <hch@xxxxxx>