mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
vfio/platform: fix module_put call in error flow
[ Upstream commitdc51ff91cf] 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:32a2d71c4e("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>
This commit is contained in:
parent
2adb0313b1
commit
46ae882bb1
|
|
@ -289,7 +289,7 @@ static int vfio_platform_open(void *device_data)
|
|||
vfio_platform_regions_cleanup(vdev);
|
||||
err_reg:
|
||||
mutex_unlock(&driver_lock);
|
||||
module_put(THIS_MODULE);
|
||||
module_put(vdev->parent_module);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user