nvidia-oot: fix crash issue in vblk driver

Using this patch we are fixing kernel crash
issue which is observed when we are unbinding
the UFS driver, and we are trying to unreserved
the mempool which was never reserved.

Bug 3960718

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ib684cc99b9e61aa945ef406af0889aebe57e1a75
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860634
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2023-02-20 11:10:21 +05:30
committed by mobile promotions
parent aa5d06bcd3
commit a0c0b2f212

View File

@@ -1358,7 +1358,12 @@ static int tegra_hv_vblk_remove(struct platform_device *pdev)
destroy_workqueue(vblkdev->wq);
tegra_hv_ivc_unreserve(vblkdev->ivck);
if ((vblkdev->config.blk_config.use_vm_address == 1U
&& vblkdev->config.blk_config.req_ops_supported & VS_BLK_IOCTL_OP_F)
|| vblkdev->config.blk_config.use_vm_address == 0U) {
tegra_hv_mempool_unreserve(vblkdev->ivmk);
}
#if (IS_ENABLED(CONFIG_TEGRA_HSIERRRPTINJ))
if (vblkdev->epl_id == IP_SDMMC)