Em Sex, 2017-01-27 às 17:20 +0000, Chris Wilson escreveu: > Just do a quick check that the stolen memory address range doesn't > overflow our chosen integer type. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx> > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c > b/drivers/gpu/drm/i915/i915_gem_stolen.c > index 42bbc4b04fd6..37a26e1c9190 100644 > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c > @@ -189,7 +189,7 @@ static dma_addr_t i915_stolen_to_dma(struct > drm_i915_private *dev_priv) > base = tom - tseg_size - ggtt->stolen_size; > } > > - if (base == 0) > + if (base == 0 || base + ggtt->stolen_size <= base) > return 0; > > /* make sure we don't clobber the GTT if it's within stolen > memory */ _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx