Re: [PATCH v2 00/10] drm/msm: probe deferral fixes

Abhinav Kumar
2022-10-21T16:06:29Z

Hi Johan

On 10/20/2022 11:27 PM, Johan Hovold wrote:
> On Tue, Sep 20, 2022 at 11:06:30AM +0200, Johan Hovold wrote:
>> On Tue, Sep 13, 2022 at 10:53:10AM +0200, Johan Hovold wrote:
>>> The MSM DRM driver is currently broken in multiple ways with respect to
>>> probe deferral. Not only does the driver currently fail to probe again
>>> after a late deferral, but due to a related use-after-free bug this also
>>> triggers NULL-pointer dereferences.
>>>
>>> These bugs are not new but have become critical with the release of
>>> 5.19 where probe is deferred in case the aux-bus EP panel driver has not
>>> yet been loaded.
>>>
>>> The underlying problem is lifetime issues due to careless use of
>>> device-managed resources.
>>
>> Any chance of getting this merged for 6.1?
>
> Is anyone picking these up as fixes for 6.1-rc as we discussed?
>
> Johan

All of these except the last two ( as discussed ) have landed in the
-fixes tree

https://gitlab.freedesktop.org/drm/msm/-/commit/6808abdb33bf90330e70a687d29f038507e06ebb

Thanks

Abhinav

>
>>> Changes in v2
>>> - use a custom devres action instead of amending the AUX bus interface
>>> (Doug)
>>> - split sanity check fixes and cleanups per bridge type (Dmitry)
>>> - add another Fixes tag for the missing bridge counter reset (Dmitry)
>>>
>>>
>>> Johan Hovold (10):
>>> drm/msm: fix use-after-free on probe deferral
>>> drm/msm/dp: fix memory corruption with too many bridges
>>> drm/msm/dsi: fix memory corruption with too many bridges
>>> drm/msm/hdmi: fix memory corruption with too many bridges
>>> drm/msm/dp: fix IRQ lifetime
>>> drm/msm/dp: fix aux-bus EP lifetime
>>> drm/msm/dp: fix bridge lifetime
>>> drm/msm/hdmi: fix IRQ lifetime
>>> drm/msm/dp: drop modeset sanity checks
>>> drm/msm/dsi: drop modeset sanity checks
>>>
>>> drivers/gpu/drm/msm/dp/dp_display.c | 26 +++++++++++++++++++-------
>>> drivers/gpu/drm/msm/dp/dp_parser.c | 6 +++---
>>> drivers/gpu/drm/msm/dp/dp_parser.h | 5 +++--
>>> drivers/gpu/drm/msm/dsi/dsi.c | 9 +++++----
>>> drivers/gpu/drm/msm/hdmi/hdmi.c | 7 ++++++-
>>> drivers/gpu/drm/msm/msm_drv.c | 1 +
>>> 6 files changed, 37 insertions(+), 17 deletions(-)