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 23:41 GMT+09:00 Gustavo Padovan <gustavo@xxxxxxxxxxx>:
> 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)
>

Still strange to me. I'd like to reproduce this error because it's
impossible that exynos_drm_device_subdrv_probe is called without load
call.
even If error, this patch must be no problem so in this case, we would
need check if there might be something we missed about component
binding not this patch.
So can you let me know where the git repository is and which defconfig
file did you tested?

Thanks,
Inki Dae

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





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux