Skip to content

Commit

Permalink
drm/i915: Avoid format string expansion from engine names
Browse files Browse the repository at this point in the history
While highly unlikely, this makes sure that the string built from
engine names won't be processed as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170411045630.GA6612@beast
  • Loading branch information
Kees Cook authored and Jani Nikula committed Apr 19, 2017
1 parent 939cf46 commit 916a491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_hangcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static void hangcheck_declare_hang(struct drm_i915_private *i915,
"%s, ", engine->name);
msg[len-2] = '\0';

return i915_handle_error(i915, hung, msg);
return i915_handle_error(i915, hung, "%s", msg);
}

/*
Expand Down

0 comments on commit 916a491

Please sign in to comment.