diff options
author | Qianfeng Rong <rongqianfeng@vivo.com> | 2025-08-21 15:22:09 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2025-08-25 15:14:54 -0300 |
commit | 2aa35b24ad12fb960d30e9e282f768e1a0af9291 (patch) | |
tree | bd97e501c441044cdafcbfdfbfc666ede0ae3e1d /drivers/infiniband/hw/ionic/ionic_datapath.c | |
parent | 08aae7860450c89eebbc6fd4d38416e53c7a33d2 (diff) |
RDMA/erdma: Use vcalloc() instead of vzalloc()
Replace vzalloc() with vcalloc() in vmalloc_to_dma_addrs(). As noted in
the kernel documentation [1], open-coded multiplication in allocator
arguments is discouraged because it can lead to integer overflow.
Use vcalloc() to gain built-in overflow protection, making memory
allocation safer when calculating allocation size compared to explicit
multiplication.
[1]: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments
Link: https://patch.msgid.link/r/20250821072209.510348-1-rongqianfeng@vivo.com
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_datapath.c')
0 files changed, 0 insertions, 0 deletions