Skip to content

Commit

Permalink
drm/i915: Nul-terminate legacy debug string
Browse files Browse the repository at this point in the history
Make sure that when we don't have any scheduler attributes for the
request, the string is terminated.

Fixes: 247870a ("drm/i915: Build request info on stack before printk")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180517152824.11619-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed May 17, 2018
1 parent 57877b7 commit 96d4f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_engine_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ static void print_request(struct drm_printer *m,
const char *prefix)
{
const char *name = rq->fence.ops->get_timeline_name(&rq->fence);
char buf[80];
char buf[80] = "";
int x = 0;

x = print_sched_attr(rq->i915, &rq->sched.attr, buf, x, sizeof(buf));
Expand Down

0 comments on commit 96d4f03

Please sign in to comment.