Message ID | 20241016200654.13472-1-zichenxie0106@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/rockchip: fix potential integer overflow in rockchip_gem_dumb_create() | expand |
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index 93ed841f5dce..76dea12fe394 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -409,7 +409,7 @@ int rockchip_gem_dumb_create(struct drm_file *file_priv, * align to 64 bytes since Mali requires it. */ args->pitch = ALIGN(min_pitch, 64); - args->size = args->pitch * args->height; + args->size = (__u64)args->pitch * args->height; rk_obj = rockchip_gem_create_with_handle(file_priv, dev, args->size, &args->handle);