mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
storage: fix cert-c issue in storage driver
Using this patch we are fixing below cert error:- 1. var_deref_model: Passing null pointer bio_req to req_op, which dereferences it. CID 10177627 Bug 3512545 Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Change-Id: Id9c71a82d3adf52590816fa87b53a8965da5c105 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2933682 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ff572997a3
commit
5d872b9a0d
@@ -437,6 +437,7 @@ static bool complete_bio_req(struct vblk_dev *vblkdev)
|
|||||||
dev_err(vblkdev->device,
|
dev_err(vblkdev->device,
|
||||||
"VSC request %d has null bio request!\n",
|
"VSC request %d has null bio request!\n",
|
||||||
vsc_req->id);
|
vsc_req->id);
|
||||||
|
goto bio_null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!vblkdev->config.blk_config.use_vm_address && READ_WRITE_OR_IOCTL_OP)
|
if ((!vblkdev->config.blk_config.use_vm_address && READ_WRITE_OR_IOCTL_OP)
|
||||||
@@ -448,6 +449,7 @@ static bool complete_bio_req(struct vblk_dev *vblkdev)
|
|||||||
vblkdev->mempool_free = vblkdev->mempool_free + vsc_req->__data_len;
|
vblkdev->mempool_free = vblkdev->mempool_free + vsc_req->__data_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bio_null:
|
||||||
vblk_put_req(vsc_req);
|
vblk_put_req(vsc_req);
|
||||||
|
|
||||||
complete_bio_exit:
|
complete_bio_exit:
|
||||||
|
|||||||
Reference in New Issue
Block a user