[Intel-gfx] [PATCH 07/11] drm/i915/gtt: Use NULL to encode scratch shadow entries

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 10 17:28:59 UTC 2019


Quoting Mika Kuoppala (2019-07-10 17:21:15)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > +     pd = alloc_pd(vm);
> > +     if (IS_ERR(pd))
> >               return pd;
> > -     }
> > -
> > -     /* 3lvl */
> > -     pd = __alloc_pd();
> > -     if (!pd)
> > -             return ERR_PTR(-ENOMEM);
> > -
> > -     pd->entry[GEN8_3LVL_PDPES] = NULL;
> 
> Ok you dont like the sentry. Perhaps you could write
> a few soothing words how noisily we crash if we
> run long on this runway. If the tower sees and
> sends firetrucks, it is fine.

It's a tight allocation (or becomes one a patch or two down); you have to
enable slab_debug to see fireworks in the redzone. Or kasan to detect
the out-of-bounds write.
-Chris


More information about the Intel-gfx mailing list