On Tue, Dec 03, 2024 at 10:02:00AM -0600, Gax-c wrote: > From: Zichen Xie <zichenxie0106@xxxxxxxxx> > > Like commit b0b0d811eac6 ("drm/mediatek: Fix coverity issue with > unintentional integer overflow"), directly multiply pitch and > height may lead to integer overflow. Add a cast to avoid it. > > Fixes: 6d1782919dc9 ("drm/cma: Introduce drm_gem_cma_dumb_create_internal()") > Fixes: dc5698e80cf7 ("Add virtio gpu driver.") > Fixes: dc6057ecb39e ("drm/tegra: gem: dumb: pitch and size are outputs") > Signed-off-by: Zichen Xie <zichenxie0106@xxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx > --- > drivers/gpu/drm/drm_gem_dma_helper.c | 6 +++--- > drivers/gpu/drm/tegra/gem.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_gem.c | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) I don't think this can ever happen. All of these functions should only ever be called via drm_mode_create_dumb(), which already ensures that these won't overflow. Thierry
Attachment:
signature.asc
Description: PGP signature