]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix use after free when printing load failure
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Wed, 23 Mar 2016 08:31:46 +0000 (10:31 +0200)
committerMika Kuoppala <mika.kuoppala@intel.com>
Wed, 23 Mar 2016 10:00:16 +0000 (12:00 +0200)
commitcca7da956b5a4ba68b77bea4481cb0412401bfc6
treec308c1b90084d77d38ac5cc7c67e8f5bebc18d08
parent40a0d54f00d5076c3e4d9c9c33d7a9667bf04f5d
drm/i915: Fix use after free when printing load failure

Commit b835c40a1904 ("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.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1458721906-10625-1-git-send-email-mika.kuoppala@intel.com
drivers/gpu/drm/i915/i915_dma.c