Re: [PATCH v1 18/18] vfio/ccw: Manage ccw/mdev reference counts

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

 



On Thu, Jun 02, 2022 at 07:19:48PM +0200, Eric Farman wrote:
> diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
> index 3833204bd388..be238cf277ff 100644
> +++ b/drivers/s390/cio/vfio_ccw_private.h
> @@ -135,6 +135,8 @@ static inline struct vfio_ccw_private *vfio_ccw_get_private(struct subchannel *s
>  		return NULL;
>  
>  	private = dev_get_drvdata(&sch->dev);
> +	if (private && !vfio_device_try_get(&private->vdev))
> +		private = NULL;

I didn't try to check everything, but obviously any of the null checks
in prior patches that are eventually converted to this call should not
be made into WARN_ON's..

This looks OK too

Jason



[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