From: Gustavo A. R. Silva Date: Tue, 28 Sep 2021 22:25:13 +0000 (-0500) Subject: nouveau/svm: Use kvcalloc() instead of kvzalloc() X-Git-Tag: v5.16-rc1~176^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71e4bbca070e84b85ee2f1748caf92f97e091c7b;p=thirdparty%2Fkernel%2Flinux.git nouveau/svm: Use kvcalloc() instead of kvzalloc() Use 2-factor argument form kvcalloc() instead of kvzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook --- diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index b0c3422cb01fa..1a896a24288aa 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c @@ -992,7 +992,7 @@ nouveau_svm_fault_buffer_ctor(struct nouveau_svm *svm, s32 oclass, int id) if (ret) return ret; - buffer->fault = kvzalloc(sizeof(*buffer->fault) * buffer->entries, GFP_KERNEL); + buffer->fault = kvcalloc(sizeof(*buffer->fault), buffer->entries, GFP_KERNEL); if (!buffer->fault) return -ENOMEM;