Re: [PATCH 07/18] vfio/mdev: Add missing reference counting to mdev_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux