mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
vsc: use max supported ioctl size
target is getting crash while triggering multiple ioctl call from userpsace due to miscalculation of mempool_virt and mempool_offset for each slot. So use max supported ioctl size macro instead of max supported read and write operation size. Bug 4336445 Change-Id: I438ff50cb0dfba845f4d7852e74314c66dab196c Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3001185 Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com> Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com> Tested-by: Tonny Liang <tonnyl@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b8fca78022
commit
e8c5cb610a
@@ -1145,8 +1145,8 @@ static void setup_device(struct vblk_dev *vblkdev)
|
||||
} else {
|
||||
if (vblkdev->config.blk_config.req_ops_supported & VS_BLK_IOCTL_OP_F) {
|
||||
req->mempool_virt = (void *)((uintptr_t)vblkdev->shared_buffer +
|
||||
(uintptr_t)((req_id % max_ioctl_requests) * max_io_bytes));
|
||||
req->mempool_offset = (req_id % max_ioctl_requests) * max_io_bytes;
|
||||
(uintptr_t)((req_id % max_ioctl_requests) * UFS_IOCTL_MAX_SIZE_SUPPORTED));
|
||||
req->mempool_offset = (req_id % max_ioctl_requests) * UFS_IOCTL_MAX_SIZE_SUPPORTED;
|
||||
}
|
||||
}
|
||||
req->mempool_len = max_io_bytes;
|
||||
|
||||
Reference in New Issue
Block a user