[Intel-gfx] [PATCH] drm/i915: Fix use after free when printing load failure

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 23 08:56:35 UTC 2016


On Wed, Mar 23, 2016 at 10:31:46AM +0200, Mika Kuoppala wrote:
> Commit d15d7538c6d2 ("drm/i915: Tune down init error message due
> to failure injection") added i915_load_error message to failure
> path on device initialization. The message is printed
> after the device is freed. And as the message printing helper
> uses the device structure, this leads to use after free.
> 
> Spotted by Kasan.

Oops. I don't think it's practical to run the entire igt with kasan
enabled (anything that stresses memory operations takes forever), even
just one machine running BAT with kasan would be enough to catch silly
errors like this one. How much heterogenity do we have in configs across
CI? I guess not enough because as always we will be limited upon
machines.
 
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list