]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite57b718e6bd60ce24c5dc34e1f4e83f10fedd86d
tree169ee2fd851d2151cc9991d2cbdff700118ca51a
parent5f24de51a2eca65f0a5999e473a7a836b8683ea8
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