]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use a temporary va_list for two-pass string handling
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Sep 2013 09:20:59 +0000 (10:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 24 Sep 2013 07:36:40 +0000 (09:36 +0200)
commit41e685020c8d448fb4e79e5b53dfcd6b3a9be7b8
treecb65cef4276e592094d59388e76f2039f15b8b77
parent8c68cf8383040c425e62cbc61b0baa60d7e7b5e0
drm/i915: Use a temporary va_list for two-pass string handling

In

commit f67bf396462c79961182742ae9003ad9ab6dc40d
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Thu May 23 13:55:35 2013 +0300

    drm/i915: avoid big kmallocs on reading error state

we introduce a two-pass mechanism for splitting long strings being
formatted into the error-state. The first pass finds the length, and the
second pass emits the right portion of the string into the accumulation
buffer. Unfortunately we use the same va_list for both passes, resulting
in the second pass reading garbage off the end of the argument list. As
the two passes are only used for boundaries between read() calls, the
corruption is only rarely seen.

This fixes the root cause behind

commit e57b718e6bd60ce24c5dc34e1f4e83f10fedd86d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Jun 29 23:26:50 2013 +0100

    drm/i915: Break up the large vsnprintf() in print_error_buffers()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gpu_error.c