]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfio: platform: fix reference leak in vfio_platform_open
authorZhang Qilong <zhangqilong3@huawei.com>
Sat, 31 Oct 2020 03:03:53 +0000 (11:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:13 +0000 (19:22 +0100)
commit0fa7baa5092263f4c8aea0ae4a5239008049a523
tree35c3322afadceba29b4a5f5efe3c1fbba50374a9
parente68d3689dcfa003b4808e124855ec872f5564fc4
vfio: platform: fix reference leak in vfio_platform_open

[ Upstream commit bb742ad01961a3b9d1f9d19375487b879668b6b2 ]

pm_runtime_get_sync() will increment pm usage counter even it
failed. Forgetting to call pm_runtime_put will result in
reference leak in vfio_platform_open, so we should fix it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/platform/vfio_platform_common.c