drm/i915: Break up the large vsnprintf() in print_error_buffers()
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 29 Jun 2013 22:26:50 +0000 (23:26 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 1 Jul 2013 09:15:01 +0000 (11:15 +0200)
commitbaf27f9b17bf2f369f3865e38c41d2163e8d815d
tree169ee2fd851d2151cc9991d2cbdff700118ca51a
parentd26e3af842023603747f1566caff5f471508bbd4
drm/i915: Break up the large vsnprintf() in print_error_buffers()

So it appears that I have encountered some bogosity when trying to call
i915_error_printf() with many arguments from print_error_buffers(). The
symptom is that the vsnprintf parser tries to interpret an integer arg
as a character string, the resulting OOPS indicating stack corruption.
Replacing the single call with its 13 format specifiers and arguments
with multiple calls to i915_error_printf() worked fine. This patch goes
one step further and introduced i915_error_puts() to pass the strings
simply.

It may not fix the root cause, but it does prevent my box from dying and
I think helps make print_error_buffers() more friendly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66077
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c