From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org,
Mika Kuoppala <mika.kuoppala@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915: Use a temporary va_list for two-pass string handling
Date: Sat, 21 Sep 2013 00:28:53 +0200 [thread overview]
Message-ID: <20130920222853.GR32145@phenom.ffwll.local> (raw)
In-Reply-To: <1379668859-21238-1-git-send-email-chris@chris-wilson.co.uk>
On Fri, Sep 20, 2013 at 10:20:59AM +0100, Chris Wilson wrote:
> In
>
> commit edc3d8848dc9fe2a470316363dab8ef211d77e01
> 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 baf27f9b17bf2f369f3865e38c41d2163e8d815d
> 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
Picked up for -fixes, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2013-09-20 22:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 9:20 [PATCH] drm/i915: Use a temporary va_list for two-pass string handling Chris Wilson
2013-09-20 22:28 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130920222853.GR32145@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox