diff options
author | Max Gurtovoy <mgurtovoy@nvidia.com> | 2021-05-18 22:21:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-10 13:24:04 +0200 |
commit | 2bd07ebcb949b17a431aacd0e99fa4558c4a5600 (patch) | |
tree | 207c8e70603f53ee48fe041fde56520b5d79bff8 /drivers/vfio/platform | |
parent | f12bd9caafedebd8e468cc3ec1dcee1920d7a9d2 (diff) | |
download | linux-stable-2bd07ebcb949b17a431aacd0e99fa4558c4a5600.tar.gz linux-stable-2bd07ebcb949b17a431aacd0e99fa4558c4a5600.tar.bz2 linux-stable-2bd07ebcb949b17a431aacd0e99fa4558c4a5600.zip |
vfio/platform: fix module_put call in error flow
[ Upstream commit dc51ff91cf2d1e9a2d941da483602f71d4a51472 ]
The ->parent_module is the one that use in try_module_get. It should
also be the one the we use in module_put during vfio_platform_open().
Fixes: 32a2d71c4e80 ("vfio: platform: introduce vfio-platform-base module")
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Message-Id: <20210518192133.59195-1-mgurtovoy@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/vfio/platform')
-rw-r--r-- | drivers/vfio/platform/vfio_platform_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index 460760d0becf..c29fc6844f84 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -295,7 +295,7 @@ err_irq: vfio_platform_regions_cleanup(vdev); err_reg: mutex_unlock(&driver_lock); - module_put(THIS_MODULE); + module_put(vdev->parent_module); return ret; } |