From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Johan Hovold <johan+linaro@kernel.org>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 04/10] drm/msm: fix NULL-deref on irq uninstall
Date: Tue, 21 Mar 2023 17:17:26 +0200 [thread overview]
Message-ID: <3025b62f-fbaa-cda3-8ab4-73e86b942450@linaro.org> (raw)
In-Reply-To: <20230306100722.28485-5-johan+linaro@kernel.org>
On 06/03/2023 12:07, Johan Hovold wrote:
> In case of early initialisation errors and on platforms that do not use
> the DPU controller, the deinitilisation code can be called with the kms
> pointer set to NULL.
>
> Fixes: f026e431cf86 ("drm/msm: Convert to Linux IRQ interfaces")
> Cc: stable@vger.kernel.org # 5.14
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 17a59d73fe01..2f2bcdb671d2 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -251,9 +251,11 @@ static int msm_drm_uninit(struct device *dev)
> drm_bridge_remove(priv->bridges[i]);
> priv->num_bridges = 0;
>
> - pm_runtime_get_sync(dev);
> - msm_irq_uninstall(ddev);
> - pm_runtime_put_sync(dev);
> + if (kms) {
> + pm_runtime_get_sync(dev);
> + msm_irq_uninstall(ddev);
> + pm_runtime_put_sync(dev);
> + }
>
> if (kms && kms->funcs)
> kms->funcs->destroy(kms);
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-03-21 15:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 10:07 [PATCH 00/10] drm/msm: fix bind error handling Johan Hovold
2023-03-06 10:07 ` [PATCH 01/10] Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue" Johan Hovold
2023-03-28 12:49 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 02/10] Revert "drm/msm: Fix failure paths in msm_drm_init()" Johan Hovold
2023-03-28 12:49 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 03/10] drm/msm: fix NULL-deref on snapshot tear down Johan Hovold
2023-03-21 15:06 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 04/10] drm/msm: fix NULL-deref on irq uninstall Johan Hovold
2023-03-21 15:17 ` Dmitry Baryshkov [this message]
2023-03-06 10:07 ` [PATCH 05/10] drm/msm: fix drm device leak on bind errors Johan Hovold
2023-03-21 14:54 ` Dmitry Baryshkov
2023-03-22 7:47 ` Johan Hovold
2023-03-24 22:04 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 06/10] drm/msm: fix vram " Johan Hovold
2023-03-24 22:06 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 07/10] drm/msm: fix missing wq allocation error handling Johan Hovold
2023-03-28 12:50 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 08/10] drm/msm: fix workqueue leak on bind errors Johan Hovold
2023-03-28 12:50 ` Dmitry Baryshkov
2023-03-06 10:07 ` [PATCH 09/10] drm/msm: use drmm_mode_config_init() Johan Hovold
2023-03-06 12:38 ` Dmitry Baryshkov
2023-03-06 13:31 ` Johan Hovold
2023-03-06 10:07 ` [PATCH 10/10] drm/msm: move include directive Johan Hovold
2023-03-21 14:43 ` Dmitry Baryshkov
2023-03-21 13:02 ` [PATCH 00/10] drm/msm: fix bind error handling Johan Hovold
2023-03-21 15:21 ` Dmitry Baryshkov
2023-03-22 7:54 ` Johan Hovold
2023-03-28 22:37 ` Dmitry Baryshkov
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=3025b62f-fbaa-cda3-8ab4-73e86b942450@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=johan+linaro@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).