Re: [PATCH 1/2] drm/exynos: fix null pointer dereference issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-11-21 Inki Dae <inki.dae@xxxxxxxxxxx>:

> On 2014년 11월 21일 08:12, Gustavo Padovan wrote:
> > 2014-11-13 Inki Dae <inki.dae@xxxxxxxxxxx>:
> > 
> >> This patch fixes null pointer dereference issue incurred
> >> when ipp driver is enabled and Exynos drm driver is closed.
> >>
> >> Non kms driver should register its own sub driver to setup necessary
> >> resources, which is done by load(). So null pointer dereference
> >> occurs when ipp driver is enabled and Exynos drm driver is closed
> >> because ipp core device is registered after component_master_add_with_match
> >> call.
> >>
> >> This patch makes exynos_drm_device_subdrv_probe() to be called after all non
> >> kms drivers are registered.
> > 
> > This patch is breaking exynos initialization, exynos_drm_device_subdrv_probe()
> > needs the drvdata but it is still NULL at this point which make the whole
> > exynos init fails. The drvdata is only set in exynos_drm_load() so we need
> > call exynos_drm_device_subdrv_probe() after that.
> 
> There might be my missing point but with this patch,
> exynos_drm_device_subdrv_probe() will be called after exynos_drm_load()
> call because all kms drivers are probed before
> component_master_add_with_match call so exynos_drm_load() must be called
> by component_master_add_with_match function before
> exynos_drm_device_subdrv_probe call.
> 
> So could you show me the error messages you faced with? There might be a
> corner case I missed.

I've added some debug output to it. It fails on
exynos_drm_device_subdrv_probe() because the drvdata is NULL. I've added debug
output to exynos_drm_load() and as you can see it doesn't get called before
subdrv_probe(). I'm testing this on snow.

[    1.767835] [drm] Initialized drm 1.1.0 20060810
[    1.771120] [drm:exynos_drm_init] 
[    1.774774] [drm:exynos_drm_platform_probe] 
[    1.778760] platform exynos-drm: Driver exynos-drm requests probe deferral
[    1.786178] platform 145b0000.dp-controller: Driver exynos-dp requests
probe deferral
[    1.794374] exynos-drm-ipp exynos-drm-ipp: drm ipp registered successfully.
[    1.800372] [drm:exynos_drm_device_subdrv_probe] dev   (null)


	Gustavo
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux