Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Hyungwon Hwang <human.hwang@samsung.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Andrzej Hajda <a.hajda@samsung.com>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH] drm/exynos: iommu: fix potential NULL pointer dereference
Date: Mon, 29 Jun 2015 15:35:44 +0900	[thread overview]
Message-ID: <20150629153544.79046d24@hwh-ubuntu> (raw)
In-Reply-To: <1435237812-24959-1-git-send-email-m.szyprowski@samsung.com>

Dear Marek,

On Thu, 25 Jun 2015 15:10:12 +0200
Marek Szyprowski <m.szyprowski@samsung.com> wrote:

> Some drivers (like Exynos mixer) calls
> drm_iommu_attach_device_if_possible before registering crtc, so
> additional check for NULL crtc pointer is required.

It seems reasonable.

Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com>

> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c
> b/drivers/gpu/drm/exynos/exynos_drm_iommu.c index
> d4ec7465e9cc..d4eb730ba254 100644 ---
> a/drivers/gpu/drm/exynos/exynos_drm_iommu.c +++
> b/drivers/gpu/drm/exynos/exynos_drm_iommu.c @@ -151,7 +151,7 @@ int
> drm_iommu_attach_device_if_possible(struct exynos_drm_crtc
> *exynos_crtc, int ret = 0; 
>  	if (is_drm_iommu_supported(drm_dev)) {
> -		if (exynos_crtc->ops->clear_channels)
> +		if (exynos_crtc && exynos_crtc->ops->clear_channels)
>  			exynos_crtc->ops->clear_channels(exynos_crtc);
>  		return drm_iommu_attach_device(drm_dev, subdrv_dev);
>  	}

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

  reply	other threads:[~2015-06-29  6:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 13:10 [PATCH] drm/exynos: iommu: fix potential NULL pointer dereference Marek Szyprowski
2015-06-29  6:35 ` Hyungwon Hwang [this message]
2015-07-02 12:46   ` Joonyoung Shim

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=20150629153544.79046d24@hwh-ubuntu \
    --to=human.hwang@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox