]> www.infradead.org Git - users/dwmw2/linux.git/commit
amdkfd: use calloc instead of kzalloc to avoid integer overflow
authorDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2024 20:11:25 +0000 (06:11 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:01:42 +0000 (13:01 +0200)
commitcbac7de1d9901521e78cdc34e15451df3611f2ad
tree15df1ea972d7d91e6653547003df93994b297362
parentcdfd0a7f01396303e9d4fb3513a1127636f12e5e
amdkfd: use calloc instead of kzalloc to avoid integer overflow

commit 3b0daecfeac0103aba8b293df07a0cbaf8b43f29 upstream.

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

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c