[PATCH v5] drm/i915: Fix NULL pointer dereference in capture_engine

Andi Shyti andi.shyti at linux.intel.com
Tue Dec 3 13:14:47 UTC 2024


Hi Eugene,

> Cc: <stable at vger.kernel.org> # v6.3+

Next time cc also the stable kernel mailing list for real,
please.

> +	        drm_info(&engine->gt->i915->drm, "Got hung context on %s with active request %lld:%lld%snot yet started\n",
> +	                 engine->name, rq->fence.context, rq->fence.seqno, guc_id);

this is very ugly: %lld:%lld%snot I understand you leave a space
from the seqno and "not", but the form is unreadable. Could it be
better:

  if (ce)
	drm_info(.... ->guc_id);
  else
	drm_info(...); <-- same thing without the guc_id

It looks like for making it easier we are making it harder.

If you decide to go this way, perhaps you can add a comment
saying that ce might be NULL, but if it's not you want to keep
the guc_id information.

Next time cc also the stable kernel mailing list, please.

Thanks,
Andi


More information about the Intel-gfx mailing list