From: Eric Anholt <eric@anholt.net>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 1/2] drm/vc4: Fix NULL pointer dereference in the async update path
Date: Thu, 15 Nov 2018 08:25:48 -0800 [thread overview]
Message-ID: <87wopez4s3.fsf@anholt.net> (raw)
In-Reply-To: <20181115105852.9844-1-boris.brezillon@bootlin.com>
[-- Attachment #1.1: Type: text/plain, Size: 869 bytes --]
Boris Brezillon <boris.brezillon@bootlin.com> writes:
> vc4_plane_atomic_async_update() calls vc4_plane_atomic_check()
> which in turn calls vc4_plane_setup_clipping_and_scaling(), and since
> commit 58a6a36fe8e0 ("drm/vc4: Use
> drm_atomic_helper_check_plane_state() to simplify the logic"), this
> function accesses plane_state->state which will be NULL when called
> from the async update path because we're passing the current plane
> state, and plane_state->state has been assigned to NULL in
> drm_atomic_helper_swap_state().
>
> Pass the new state instead of the current one (the new state has
> ->state set to a non-NULL value).
>
> Fixes: 58a6a36fe8e0 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic")
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
I'm glad this worked!
Reviewed-by: Eric Anholt <eric@anholt.net>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-11-15 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 10:58 [PATCH v3 1/2] drm/vc4: Fix NULL pointer dereference in the async update path Boris Brezillon
2018-11-15 10:58 ` [PATCH v3 2/2] drm/vc4: Set ->legacy_cursor_update to false when doing non-async updates Boris Brezillon
2018-11-15 16:25 ` Eric Anholt [this message]
2018-11-15 16:58 ` [PATCH v3 1/2] drm/vc4: Fix NULL pointer dereference in the async update path Boris Brezillon
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=87wopez4s3.fsf@anholt.net \
--to=eric@anholt.net \
--cc=boris.brezillon@bootlin.com \
--cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.