nvidia-oot: align ioctl buffer to 512 byte

Using this patch we are aligning ioctl
buffer to 512 byte address passed to
storage server

Bug 4054343

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I1384e47411e3e07e27615c434363c37e18060104
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920267
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@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-06-13 10:43:04 +05:30
committed by mobile promotions
parent af59e64885
commit 312d19b2ff

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <linux/kernel.h> /* printk() */
@@ -73,6 +73,9 @@ int vblk_prep_mmc_multi_ioc(struct vblk_dev *vblkdev,
goto free_ioc_buf;
}
/* should be 512 byte aligned */
combo_cmd_size = ALIGN(combo_cmd_size, SZ_512);
if (combo_cmd_size > ioctl_bytes) {
dev_err(vblkdev->device,
" buffer has no enough space to serve ioctl\n");