]> git.itanic.dy.fi Git - linux-stable/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:09:56 +0000 (13:09 +0200)
commit0c33d11153949310d76631d8f4a4736519eacd3a
treee4436ca2cbb869a4cc7d62fa8ac629b99ea126ab
parentb95f2066a910ace64787dc4f3e1dfcb2e7e71718
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