Skip to contentSkip to conversation

drm: i915: Avoid format string expansion from engine names

PATCH Applied Kees Cook 2 participants 2 messages Apr 11, 2017 – Apr 19, 2017

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 drm: i915: Avoid format string expansion from engine names

While highly unlikely, this makes sure that the string built from engine names won't be processed as a format string.

---
 drivers/gpu/drm/i915/intel_hangcheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hangcheck.c +1 -1
index f05971f5586f..be3550cec8e4 100644
@@ -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);
 }
 
 /*
Signature · 10 lines
2.7.4


-- 
Kees Cook
Pixel Security
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Applied
#1 lore raw
Quoted 4 lines · Kees Cook

While highly unlikely, this makes sure that the string built from engine names won't be processed as a format string.

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_hangcheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hangcheck.c +1 -1
index f05971f5586f..be3550cec8e4 100644
@@ -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);
 }
 
 /*
Signature · 1 line
2.7.4
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel