All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Tony Krowiak <akrowiak@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	borntraeger@de.ibm.com, cohuck@redhat.com,
	pasic@linux.vnet.ibm.com, jjherne@linux.ibm.com,
	alex.williamson@redhat.com, kwankhede@nvidia.com,
	stable@vger.kernel.org, Tony Krowiak <akrowiak@stny.rr.com>
Subject: Re: [PATCH v2] s390/vfio-ap: fix memory leak in mdev remove callback
Date: Thu, 13 May 2021 14:25:09 -0300	[thread overview]
Message-ID: <20210513172509.GJ1002214@nvidia.com> (raw)
In-Reply-To: <759f8840-671a-446c-875b-798dceb10d0f@linux.ibm.com>

On Thu, May 13, 2021 at 10:18:44AM -0400, Tony Krowiak wrote:
> 
> 
> On 5/12/21 8:41 AM, Jason Gunthorpe wrote:
> > On Mon, May 10, 2021 at 05:48:37PM -0400, 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. The intended purpose was
> > > to prevent the mdev from being removed while in use; however, returning a
> > > non-zero rc does not prevent removal. This could result in a memory leak
> > > of the resources allocated when the mdev was created. In addition, the
> > > KVM guest will still have access to the AP devices assigned to the mdev
> > > even though the mdev no longer exists.
> > > 
> > > To prevent this scenario, cleanup will be done - including unplugging the
> > > AP adapters, domains and control domains - regardless of whether the mdev
> > > is in use by a KVM guest or not.
> > > 
> > > Fixes: 258287c994de ("s390: vfio-ap: implement mediated device open callback")
> > > Cc: stable@vger.kernel.org
> > > Signed-off-by: Tony Krowiak <akrowiak@stny.rr.com>
> > >   drivers/s390/crypto/vfio_ap_ops.c | 13 ++-----------
> > >   1 file changed, 2 insertions(+), 11 deletions(-)
> > Can you please ensure this goes to a -rc branch or through Alex's
> > tree?
> 
> I'm sorry, I don't know what a -rc branch is nor how to push this
> to Alex's tree, but I'd be happy to do so if you tell me now:)

If Christian takes it for 5.13-rc then that is OK

Otherwise please ask AlexW to take it

Thanks,
Jason

  reply	other threads:[~2021-05-13 17:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 21:48 [PATCH v2] s390/vfio-ap: fix memory leak in mdev remove callback Tony Krowiak
2021-05-10 21:56 ` Tony Krowiak
2021-05-12 10:35 ` Cornelia Huck
2021-05-12 12:41 ` Jason Gunthorpe
2021-05-12 15:32   ` Christian Borntraeger
2021-05-12 16:50     ` Jason Gunthorpe
2021-05-13 14:19     ` Tony Krowiak
2021-05-13 14:18   ` Tony Krowiak
2021-05-13 17:25     ` Jason Gunthorpe [this message]
2021-05-13 17:32       ` Halil Pasic
2021-05-13 17:34         ` Jason Gunthorpe
2021-05-12 16:49 ` Christian Borntraeger
2021-05-12 18:35 ` Halil Pasic
2021-05-13 14:35   ` Tony Krowiak
2021-05-13 17:45     ` Halil Pasic
2021-05-13 19:23       ` Tony Krowiak
2021-05-14  0:15         ` Halil Pasic
2021-05-17 13:37           ` Tony Krowiak
2021-05-17 19:10             ` Halil Pasic
2021-05-18  9:30               ` Christian Borntraeger
2021-05-18 13:42                 ` Tony Krowiak
2021-05-18 13:59                   ` Christian Borntraeger
2021-05-18 15:33                     ` Halil Pasic
2021-05-18 17:01                       ` Christian Borntraeger
2021-05-18 23:27                         ` Halil Pasic
2021-05-19  8:17                           ` Christian Borntraeger
2021-05-19 11:22                             ` Christian Borntraeger
2021-05-19 12:59                               ` Halil Pasic
2021-05-19 13:02                               ` Jason Gunthorpe
2021-05-19 11:25                             ` Halil Pasic
2021-05-18 18:14                     ` Tony Krowiak
2021-05-18 18:22                       ` Christian Borntraeger
2021-05-18 18:40                         ` Tony Krowiak
2021-05-18 13:41               ` Tony Krowiak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210513172509.GJ1002214@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=akrowiak@stny.rr.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=jjherne@linux.ibm.com \
    --cc=kwankhede@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.