[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210621172714.GS1002214@nvidia.com>
Date: Mon, 21 Jun 2021 14:27:14 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Christian Borntraeger <borntraeger@...ibm.com>
Cc: Tony Krowiak <akrowiak@...ux.ibm.com>, cohuck@...hat.com,
pasic@...ux.vnet.ibm.com, jjherne@...ux.ibm.com,
alex.williamson@...hat.com, kwankhede@...dia.com,
frankja@...ux.ibm.com, david@...hat.com, imbrenda@...ux.ibm.com,
hca@...ux.ibm.com, Vasily Gorbik <gor@...ux.ibm.com>,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/2] s390/vfio-ap: clean up mdev resources when remove
callback invoked
On Mon, Jun 21, 2021 at 06:04:54PM +0200, Christian Borntraeger wrote:
>
>
> On 21.06.21 17:57, Tony Krowiak wrote:
> > The mdev remove callback for the vfio_ap device driver bails out with
> > -EBUSY if the mdev is in use by a KVM guest (i.e., the KVM pointer in the
> > struct ap_matrix_mdev is not NULL). The intended purpose was
> > to prevent the mdev from being removed while in use. There are two
> > problems with this scenario:
> >
> > 1. Returning a non-zero return code from the remove callback does not
> > prevent the removal of the mdev.
> >
> > 2. The KVM pointer in the struct ap_matrix_mdev will always be NULL because
> > the remove callback will not get invoked until the mdev fd is closed.
> > When the mdev fd is closed, the mdev release callback is invoked and
> > clears the KVM pointer from the struct ap_matrix_mdev.
> >
> > Let's go ahead and remove the check for KVM in the remove callback and
> > allow the cleanup of mdev resources to proceed.
> >
> > Signed-off-by: Tony Krowiak <akrowiak@...ux.ibm.com>
> > Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
> > Cc: stable@...r.kernel.org
>
> This one is already queued on
>
> https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/log/?h=fixes
>
> Jason. Do you want this in stable? Then we should write a mail after
> merging.
It is fine as is, we are already at rc7, so long as it goes to some
tree for this merge window
Jason
Powered by blists - more mailing lists