Re: [PATCH 7/8] vfio: Follow the naming pattern for vfio_group_ioctl_unset_container()

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

 



On Mon, 29 Aug 2022 12:28:07 -0300
Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:

> On Mon, Aug 29, 2022 at 12:41:30AM +0000, Tian, Kevin wrote:
> > > From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> > > Sent: Thursday, August 18, 2022 12:07 AM
> > > 
> > > Make it clear that this is the body of the ioctl - keep the mutex outside
> > > the function since this function doesn't have and wouldn't benefit from
> > > error unwind.  
> > 
> > but doing so make unset_container() unpair with set_container() and
> > be the only one doing additional things in main ioctl body.
> > 
> > I'd prefer to moving mutex inside unset_container() for better readability.  
> 
> Yes, I tried both ways and ended up here since adding the goto unwind
> was kind of ungainly for this function. Don't mind either way
> 
> The functions are not intended as strict pairs, they are ioctl
> dispatch functions.

The lockdep annotation seems sufficient, but what about simply
prefixing the unset ioctl function with underscores to reinforce the
locking requirement, as done by the called function
__vfio_group_unset_container()?  Thanks,

Alex




[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