nouveau/u_memcpya: use kvmalloc_array.
Subsystems (3)
Dave Airlie
maintainerPATCH 1/1 nouveau/u_memcpya: use kvmalloc_array.
From: Dave Airlie <[email protected]>
I think there are limit checks in places for most things but the new api wants to not have them.
Signed-off-by Dave Airlie <[email protected]>
--- drivers/gpu/drm/nouveau/nouveau_drv.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_drv.h +1 -3
@@ -192,9 +192,7 @@ u_memcpya(uint64_t user, unsigned nmemb, unsigned size)void *mem;void __user *userptr = (void __force __user *)(uintptr_t )user; - size *= nmemb; - - mem =kvmalloc (size,GFP_KERNEL ); + mem =kvmalloc_array (nmemb, size,GFP_KERNEL );if (!mem)return ERR_PTR (-ENOMEM );
Signature · 1 line
2.41.0