Re: [PATCH] drm/i915: Prevent oops on req->engine in rcu-protected peeking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 05, 2016 at 06:37:00PM +0200, Daniel Vetter wrote:
> When only rcu-protected we might peek at a reinitializing request.
> Prevent carnage by making sure we don't accidentally chase a NULL
> pointer.
> 
> The proper fix for this is to drop the memset (with kzalloc) in the
> request allocation function, since that avoids both the NULL check in
> these fastpaths and makes request allocation a notch lighter. But it
> also means we need to careful audit all the paths to make sure nothing
> gets upset and runs into garbage. And that's a bit much on a late Friday
> with Joonas already on w/e. Also, today is drm-intel-next tag day, and
> this will be the tag for the first 4.9 pull request.
> 
> Hence this easier to review interim fix, which will be replaced early next
> week by the proper fix Chris is working on.
> 
> Fixes: 0eafec6d3244 ("drm/i915: Enable lockless lookup of request...")
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: "Goel, Akash" <akash.goel@xxxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

This is not complete either since we do RCU lookups elsewhere as well.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux