All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Inki Dae <inki.dae@samsung.com>, dri-devel@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch
Subject: Re: [PATCH] drm/atomic: fix null pointer access to mode_fixup callback
Date: Tue, 11 Aug 2015 14:15:38 +0200	[thread overview]
Message-ID: <55C9E76A.5000604@linux.intel.com> (raw)
In-Reply-To: <1439294427-9723-1-git-send-email-inki.dae@samsung.com>

Op 11-08-15 om 14:00 schreef Inki Dae:
> This patch fixes null pointer access incurred when
> encoder driver didn't set its own mode_fixup callback.
>
> mode_fixup callback shoudn't be called if the callback
> of drm_encoder_helper_funcs is NULL.
>
> Signed-off-by: Inki Dae <inki.dae@samsung.com>
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 5b59d5ad..b69469c 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -299,6 +299,9 @@ mode_fixup(struct drm_atomic_state *state)
>  				return ret;
>  			}
>  		} else {
> +			if (!funcs->mode_fixup)
> +				continue;
Change it to } else if (funcs->mode_fixup) { ?

Reviewed-By: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>


>  			ret = funcs->mode_fixup(encoder, &crtc_state->mode,
>  						&crtc_state->adjusted_mode);
>  			if (!ret) {

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2015-08-11 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 12:00 [PATCH] drm/atomic: fix null pointer access to mode_fixup callback Inki Dae
2015-08-11 12:15 ` Maarten Lankhorst [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=55C9E76A.5000604@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    /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.