diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2014-02-07 17:40:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-22 13:34:48 -0800 |
commit | 402b464ec96dc73b0910b2176e6532575a47bc98 (patch) | |
tree | 5f4f8b878469f29b2c891bc6d507f0d7433ba1c2 /drivers | |
parent | f1a68b16801be34cd5ff763a4e0133e00a499f1e (diff) | |
download | lwn-402b464ec96dc73b0910b2176e6532575a47bc98.tar.gz lwn-402b464ec96dc73b0910b2176e6532575a47bc98.zip |
drm/i915: Pair va_copy with va_end in i915_error_vprintf
commit 1d2cb9a54abc6e1d239f28f07661366d5662a94a upstream.
Each invocation of va_copy() must be matched by a corresponding
invocation of va_end() in the same function.
This regression has been introduced in
commit e29bb4ebbf000ff9ac081d29784a3331618f012e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Sep 20 10:20:59 2013 +0100
drm/i915: Use a temporary va_list for two-pass string handling
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 6705f3bc1768..a052ef92fce8 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -146,7 +146,10 @@ static void i915_error_vprintf(struct drm_i915_error_state_buf *e, va_list tmp; va_copy(tmp, args); - if (!__i915_error_seek(e, vsnprintf(NULL, 0, f, tmp))) + len = vsnprintf(NULL, 0, f, tmp); + va_end(tmp); + + if (!__i915_error_seek(e, len)) return; } |