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:37:03 +0200 |
| commit | 087b803a5b497deea7a5e8b529268a5312b70aab (patch) | |
| tree | 59cbb52d0eb5e5e0701b6f0b4f8b8ee12ce57595 /drivers/vfio | |
| parent | 60dcad10e2c7fa00f38ca1250597aea48bfdb91b (diff) | |
| download | linux-087b803a5b497deea7a5e8b529268a5312b70aab.tar.gz linux-087b803a5b497deea7a5e8b529268a5312b70aab.tar.bz2 linux-087b803a5b497deea7a5e8b529268a5312b70aab.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')
| -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 152e5188183c..6f727034679f 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -289,7 +289,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; } |
