[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7fc8184-8a51-9c7e-6ef5-aa245edb7b9d@linux.ibm.com>
Date: Thu, 13 May 2021 10:19:49 -0400
From: Tony Krowiak <akrowiak@...ux.ibm.com>
To: Christian Borntraeger <borntraeger@...ibm.com>,
Jason Gunthorpe <jgg@...dia.com>
Cc: linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
cohuck@...hat.com, pasic@...ux.vnet.ibm.com, jjherne@...ux.ibm.com,
alex.williamson@...hat.com, kwankhede@...dia.com,
stable@...r.kernel.org, Tony Krowiak <akrowiak@...y.rr.com>
Subject: Re: [PATCH v2] s390/vfio-ap: fix memory leak in mdev remove callback
On 5/12/21 11:32 AM, Christian Borntraeger wrote:
>
>
> On 12.05.21 14:41, 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@...r.kernel.org
>>> Signed-off-by: Tony Krowiak <akrowiak@...y.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?
>
> So you want this is 5.13-rc?
> I can apply this to the s390 tree if that is ok.
If it is in time for 5.13.-rc, then yes, go ahead and
apply it.
Powered by blists - more mailing lists