From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Hyungwon Hwang <human.hwang@samsung.com>,
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: Thu, 02 Jul 2015 21:46:46 +0900 [thread overview]
Message-ID: <559532B6.7020509@samsung.com> (raw)
In-Reply-To: <20150629153544.79046d24@hwh-ubuntu>
On 06/29/2015 03:35 PM, Hyungwon Hwang wrote:
> 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>
>
This patch is ok but i think it can remove to use clear_channels
function pointer and drm_iommu_attach_device_if_possible function
because already drm_iommu_attach_device function checks whether support
iommu internally.
I will ready related patch.
Thanks.
>>
>> 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
prev parent reply other threads:[~2015-07-02 12:46 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
2015-07-02 12:46 ` Joonyoung Shim [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=559532B6.7020509@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=human.hwang@samsung.com \
--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