[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+M3ks5mHE6G9EeKbRO4hO=-8PsK2xuTz4S5T7ojkVwx1_=wmQ@mail.gmail.com>
Date: Tue, 7 Aug 2018 15:37:20 +0200
From: Benjamin Gaignard <benjamin.gaignard@...aro.org>
To: Peter Rosin <peda@...ntia.se>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Sean Paul <seanpaul@...omium.org>,
David Airlie <airlied@...ux.ie>,
Vincent Abriou <vincent.abriou@...com>,
ML dri-devel <dri-devel@...ts.freedesktop.org>,
Daniel Vetter <daniel@...ll.ch>
Subject: Re: [PATCH v2 1/2] drm/sti: do not remove the drm_bridge that was
never added
2018-08-06 8:19 GMT+02:00 Peter Rosin <peda@...ntia.se>:
> Removing the drm_bridge_remove call should avoid a NULL dereference
> during list processing in drm_bridge_remove if the error path is ever
> taken.
>
> The more natural approach would perhaps be to add a drm_bridge_add,
> but there are several other bridges that never call drm_bridge_add.
> Just removing the drm_bridge_remove is the easier fix.
>
> Fixes: 84601dbdea36 ("drm: sti: rework init sequence")
> Acked-by: Daniel Vetter <daniel.vetter@...ll.ch>
> Signed-off-by: Peter Rosin <peda@...ntia.se>
Pushed on drm-misc-next,
Thanks,
Benjamin
> ---
> drivers/gpu/drm/sti/sti_hda.c | 1 -
> drivers/gpu/drm/sti/sti_hdmi.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
> index 67bbdb49fffc..199db13f565c 100644
> --- a/drivers/gpu/drm/sti/sti_hda.c
> +++ b/drivers/gpu/drm/sti/sti_hda.c
> @@ -721,7 +721,6 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)
> return 0;
>
> err_sysfs:
> - drm_bridge_remove(bridge);
> return -EINVAL;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index 58f431102512..932724784942 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -1315,7 +1315,6 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)
> return 0;
>
> err_sysfs:
> - drm_bridge_remove(bridge);
> hdmi->drm_connector = NULL;
> return -EINVAL;
> }
> --
> 2.11.0
>
Powered by blists - more mailing lists