amdkfd: use calloc instead of kzalloc to avoid integer overflow

[ Upstream commit 3b0daecfeac0103aba8b293df07a0cbaf8b43f29 ]

This uses calloc instead of doing the multiplication which might
overflow.

This fixes CVE-2024-26817

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
This commit is contained in:
Dave Airlie 2024-04-12 06:11:25 +10:00 committed by frankjpliu
parent 5539eb9481
commit 6c2cd75f27

Diff Content Not Available