From: Eric Anholt <eric@anholt.net>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state()
Date: Sun, 21 Jan 2018 11:08:47 +0800 [thread overview]
Message-ID: <87h8rfx60w.fsf@anholt.net> (raw)
In-Reply-To: <20180118145821.22344-1-boris.brezillon@free-electrons.com>
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> When saving BOs in the hang state we skip one entry of the
> kernel_state->bo[] array, thus leaving it to NULL. This leads to a NULL
> pointer dereference when, later in this function, we iterate over all
> BOs to check their ->madv state.
>
> Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> Changes in v2:
> - Get rid of prev_idx an replace it by k which is indepently incremented
> every time a new object is added to kernel_state->bo[].
> - Add a WARN_ON_ONCE() when final value of k is inconsistent
Reviewed and pushed to drm-misc-fixes back on Thursday. Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2018-01-21 3:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 14:58 [PATCH v2] drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state() Boris Brezillon
2018-01-21 3:08 ` Eric Anholt [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=87h8rfx60w.fsf@anholt.net \
--to=eric@anholt.net \
--cc=airlied@linux.ie \
--cc=boris.brezillon@free-electrons.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--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