On Tue, 23 Mar 2021 14:55:24 -0300 Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > struct mdev_type holds a pointer to the kref'd object struct mdev_parent, > but doesn't hold the kref. The lifetime of the parent becomes implicit > because parent_remove_sysfs_files() is supposed to remove all the access > before the parent can be freed, but this is very hard to reason about. > > Make it obviously correct by adding the missing get. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/vfio/mdev/mdev_sysfs.c | 4 ++++ > 1 file changed, 4 insertions(+) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>