mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Inki Dae <inki.dae@samsung.com>
Cc: jy0922.shim@samsung.com, sw0312.kim@samsung.com,
	kyungmin.park@samsung.com, airlied@linux.ie, kgene@kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/exynos: Check for NULL dereference of crtc
Date: Fri, 6 Mar 2015 14:04:31 +0000	[thread overview]
Message-ID: <20150306140431.GE4286@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <54F9A806.6020605@samsung.com>

On Fri, Mar 06, 2015 at 10:13:42PM +0900, Inki Dae wrote:
> On 2015년 02월 18일 02:14, Charles Keepax wrote:
> > The commit "drm/exynos: remove exynos_plane_dpms" (d9ea6256) removed the
> > use of the enabled flag, which means that the code may attempt to call
> > win_enable on a NULL crtc. This results in the following oops on
> 
> Hmm... it's strange. plane->funcs->destroy() is called prior to
> crtc->funcs->destroy() so it should be exynos_crtc is not NULL. However,
> it seems there is any corner case we didn't catch up.
> 
> Applied.

Thanks, it seems the offending path in an error path, looks like
Arndale is missing some required DT setting which causes
exynos_drm_load to fail:

[    1.638109] of_graph_get_next_endpoint(): no port node found in /dp-controller@145B0000
[    1.646424] exynos-drm exynos-drm: bound 14400000.fimd (ops fimd_component_ops)
[    1.652704] /dp-controller@145B0000: could not find display-timings node
[    1.659323] /dp-controller@145B0000: no timings specified
[    1.664709] [drm:exynos_dp_bind] *ERROR* failed: of_get_videomode() : -22
[    1.671485] exynos-drm exynos-drm: failed to bind 145b0000.dp-controller (ops exynos_dp_ops): -22

Which ends up calling exynos_plane_destroy as part of the clean up:

[    1.698655] [<c0015db4>] (unwind_backtrace) from [<c00121cc>] (show_stack+0x20/0x24)
[    1.706385] [<c00121cc>] (show_stack) from [<c0528230>] (dump_stack+0x78/0xc4)
[    1.713588] [<c0528230>] (dump_stack) from [<c02f72ec>] (exynos_disable_plane+0x2c/0x60)
[    1.721660] [<c02f72ec>] (exynos_disable_plane) from [<c02f733c>] (exynos_plane_destroy+0x1c/0x30)
[    1.730605] [<c02f733c>] (exynos_plane_destroy) from [<c02e37c4>] (drm_mode_config_cleanup+0x168/0x20c)
[    1.739982] [<c02e37c4>] (drm_mode_config_cleanup) from [<c02f3d18>] (exynos_drm_load+0xac/0x12c)
[    1.748832] [<c02f3d18>] (exynos_drm_load) from [<c02dc074>] (drm_dev_register+0xb0/0x110)
[    1.757075] [<c02dc074>] (drm_dev_register) from [<c02ddc88>] (drm_platform_init+0x50/0xe0)
[    1.765405] [<c02ddc88>] (drm_platform_init) from [<c02f3a08>] (exynos_drm_bind+0x20/0x28)
[    1.773655] [<c02f3a08>] (exynos_drm_bind) from [<c02fe664>] (try_to_bring_up_master.part.1+0xd8/0x114)
[    1.783027] [<c02fe664>] (try_to_bring_up_master.part.1) from [<c02fe754>] (component_master_add_with_match+0xb4/0x134)
[    1.793792] [<c02fe754>] (component_master_add_with_match) from [<c02f3e94>] (exynos_drm_platform_probe+0xfc/0x124)
[    1.804207] [<c02f3e94>] (exynos_drm_platform_probe) from [<c0304a44>] (platform_drv_probe+0x58/0xb4)
[    1.813411] [<c0304a44>] (platform_drv_probe) from [<c0302fa8>] (driver_probe_device+0x11c/0x23c)
[    1.822261] [<c0302fa8>] (driver_probe_device) from [<c0303164>] (__driver_attach+0x9c/0xa0)
[    1.830679] [<c0303164>] (__driver_attach) from [<c03014a0>] (bus_for_each_dev+0x64/0x98)
[    1.838838] [<c03014a0>] (bus_for_each_dev) from [<c0302a4c>] (driver_attach+0x2c/0x30)
[    1.846824] [<c0302a4c>] (driver_attach) from [<c030269c>] (bus_add_driver+0xe8/0x1e4)
[    1.854722] [<c030269c>] (bus_add_driver) from [<c0303ad8>] (driver_register+0x88/0x104)
[    1.862794] [<c0303ad8>] (driver_register) from [<c03048ac>] (__platform_driver_register+0x58/0x6c)
[    1.871827] [<c03048ac>] (__platform_driver_register) from [<c02f3f84>] (exynos_drm_init+0xc8/0x124)
[    1.880936] [<c02f3f84>] (exynos_drm_init) from [<c00089f4>] (do_one_initcall+0x90/0x1e0)
[    1.889096] [<c00089f4>] (do_one_initcall) from [<c08b2e24>] (kernel_init_freeable+0x114/0x1e0)
[    1.897779] [<c08b2e24>] (kernel_init_freeable) from [<c05235ac>] (kernel_init+0x18/0xfc)
[    1.905934] [<c05235ac>] (kernel_init) from [<c000efa0>] (ret_from_fork+0x14/0x34)

Hope that helps some, afraid I am not really familiar enough with
the graphics stack to chase that down much more though.

Thanks,
Charles

  reply	other threads:[~2015-03-06 14:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 17:14 Charles Keepax
2015-03-06 13:13 ` Inki Dae
2015-03-06 14:04   ` Charles Keepax [this message]
2015-03-07 12:19     ` Inki Dae

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=20150306140431.GE4286@opensource.wolfsonmicro.com \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sw0312.kim@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

Powered by JetHome