public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [bug report] drm/i915: Small compaction of the engine init code
@ 2016-12-15 20:44 Dan Carpenter
  2016-12-15 20:54 ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2016-12-15 20:44 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx, dri-devel

Hello Tvrtko Ursulin,

The patch a19d6ff29a82: "drm/i915: Small compaction of the engine
init code" from Jun 23, 2016, leads to the following static checker
warning:

	drivers/gpu/drm/i915/intel_lrc.c:1973 logical_render_ring_init()
	warn: passing freed memory 'engine'

drivers/gpu/drm/i915/intel_lrc.c
  1970  
  1971          ret = logical_ring_init(engine);
  1972          if (ret) {
  1973                  lrc_destroy_wa_ctx_obj(engine);

The problem is that logical_ring_init() frees "engine" on the error
path so this is a use after free.

  1974          }
  1975  
  1976          return ret;
  1977  }

regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-16  8:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15 20:44 [bug report] drm/i915: Small compaction of the engine init code Dan Carpenter
2016-12-15 20:54 ` Chris Wilson
2016-12-16  8:02   ` [Intel-gfx] " Tvrtko Ursulin
2016-12-16  8:38     ` Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox