On Fri, Jun 25 2021, Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > Dan points out that an error case left things on this list. It is also > missing locking in available_instances_show(). > > Further study shows the list isn't needed at all, just store the total > ports in use in an atomic and delete the whole thing. > > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Fixes: 09177ac91921 ("vfio/mtty: Convert to use vfio_register_group_dev()") > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > samples/vfio-mdev/mtty.c | 24 ++++++------------------ > 1 file changed, 6 insertions(+), 18 deletions(-) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>