summaryrefslogtreecommitdiff
path: root/include/linux/array_size.h
diff options
context:
space:
mode:
authorWilliam Theesfeld <william@theesfeld.net>2026-06-01 22:37:58 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-04 19:33:24 +0300
commit93790c374b9d77f3db15786d7d432872d92751cf (patch)
tree5f4755de71d1cd32d68a4de27a2c4284eab1e074 /include/linux/array_size.h
parentc1c3d01e3a9038d3e8f497e773e1f7b5d6b8212a (diff)
downloadlinux-93790c374b9d77f3db15786d7d432872d92751cf.tar.xz
net/mlx5: convert miss_list allocation to kvmalloc_array()
dr_icm_buddy_init_ste_cache() allocates the per-buddy miss_list using the open-coded kvmalloc(n * sizeof(*p), ...) form. The neighbouring allocations in the same function already use the kvcalloc()/ kvzalloc_objs() forms; switch this last one to kvmalloc_array() for consistency and for the size_mul overflow check that kvmalloc_array() performs. The semantics are unchanged: kvmalloc_array() returns a non-zeroed buffer, just like the previous kvmalloc() call. Existing callers of buddy->miss_list initialise each list_head before use. Signed-off-by: William Theesfeld <william@theesfeld.net> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260601193758.626537-1-william@theesfeld.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/array_size.h')
0 files changed, 0 insertions, 0 deletions