From: Kirti Wankhede <kwankhede@nvidia.com>
To: Cornelia Huck <cohuck@redhat.com>, <wu000273@umn.edu>
Cc: <kjlu@umn.edu>, Alex Williamson <alex.williamson@redhat.com>,
Neo Jia <cjia@nvidia.com>,
Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,
Jike Song <jike.song@intel.com>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vfio/mdev: Fix reference count leak in add_mdev_supported_type.
Date: Fri, 29 May 2020 23:25:29 +0530 [thread overview]
Message-ID: <526ecc5d-a94a-e684-84a3-67eec43a370a@nvidia.com> (raw)
In-Reply-To: <20200528090220.6dc94bd7.cohuck@redhat.com>
On 5/28/2020 12:32 PM, Cornelia Huck wrote:
> On Wed, 27 May 2020 21:01:09 -0500
> wu000273@umn.edu wrote:
>
>> From: Qiushi Wu <wu000273@umn.edu>
>>
>> kobject_init_and_add() takes reference even when it fails.
>> If this function returns an error, kobject_put() must be called to
>> properly clean up the memory associated with the object. Thus,
>> replace kfree() by kobject_put() to fix this issue. Previous
>> commit "b8eb718348b8" fixed a similar problem.
>>
>> Fixes: 7b96953bc640 ("vfio: Mediated device Core driver")
>> Signed-off-by: Qiushi Wu <wu000273@umn.edu>
>> ---
>> drivers/vfio/mdev/mdev_sysfs.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
>
Thanks for fixing.
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
next prev parent reply other threads:[~2020-05-29 17:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 2:01 [PATCH] vfio/mdev: Fix reference count leak in add_mdev_supported_type wu000273
2020-05-28 7:02 ` Cornelia Huck
2020-05-29 17:55 ` Kirti Wankhede [this message]
2020-05-29 22:19 ` Alex Williamson
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=526ecc5d-a94a-e684-84a3-67eec43a370a@nvidia.com \
--to=kwankhede@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=bjsdjshi@linux.vnet.ibm.com \
--cc=cjia@nvidia.com \
--cc=cohuck@redhat.com \
--cc=jike.song@intel.com \
--cc=kjlu@umn.edu \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wu000273@umn.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox