Re: [Intel-gfx] [PATCH 16/26] drm/i915/gvt: use array_size

2023-06-26 Thread Dan Carpenter
On Mon, Jun 26, 2023 at 11:26:55AM +0200, Andi Shyti wrote: > > diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c > > index 4ec85308379a..df52385ad436 100644 > > --- a/drivers/gpu/drm/i915/gvt/gtt.c > > +++ b/drivers/gpu/drm/i915/gvt/gtt.c > > @@ -1969,14 +1969,16 @@ stat

Re: [Intel-gfx] [PATCH 16/26] drm/i915/gvt: use array_size

2023-06-26 Thread Andi Shyti
Hi Julia, On Fri, Jun 23, 2023 at 11:14:47PM +0200, Julia Lawall wrote: > Use array_size to protect against multiplication overflows. > > The changes were done using the following Coccinelle semantic patch: > > // > @@ > expression E1, E2; > constant C1, C2; > identifier alloc = {vm

[Intel-gfx] [PATCH 16/26] drm/i915/gvt: use array_size

2023-06-23 Thread Julia Lawall
Use array_size to protect against multiplication overflows. The changes were done using the following Coccinelle semantic patch: // @@ expression E1, E2; constant C1, C2; identifier alloc = {vmalloc,vzalloc}; @@ ( alloc(C1 * C2,...) | alloc( - (E1) * (E2) +