The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x ca090c837b430752038b24e56dd182010d77f6f6 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2023051359-eats-capable-97be@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
ca090c837b43 ("drm/msm: fix missing wq allocation error handling") dfa70344d1b5 ("Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue"") 643b7d0869cc ("drm/msm: Add missing check and destroy for alloc_ordered_workqueue") 2027e5b3413d ("drm/msm: Initialize MDSS irq domain at probe time") ec919e6e7146 ("drm/msm: Allocate msm_drm_private early and pass it as driver data") 83b965d118cb ("Merge remote-tracking branch 'drm/drm-next' into msm-next-staging")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ca090c837b430752038b24e56dd182010d77f6f6 Mon Sep 17 00:00:00 2001 From: Johan Hovold johan+linaro@kernel.org Date: Mon, 6 Mar 2023 11:07:19 +0100 Subject: [PATCH] drm/msm: fix missing wq allocation error handling
Add the missing sanity check to handle workqueue allocation failures.
Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Cc: stable@vger.kernel.org # 3.12 Cc: Rob Clark robdclark@gmail.com Signed-off-by: Johan Hovold johan+linaro@kernel.org Reviewed-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org Patchwork: https://patchwork.freedesktop.org/patch/525102/ Link: https://lore.kernel.org/r/20230306100722.28485-8-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 4d85ca0ba0c1..2a9a363afe50 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -433,6 +433,10 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv) priv->dev = ddev;
priv->wq = alloc_ordered_workqueue("msm", 0); + if (!priv->wq) { + ret = -ENOMEM; + goto err_put_dev; + }
INIT_LIST_HEAD(&priv->objects); mutex_init(&priv->obj_lock);
linux-stable-mirror@lists.linaro.org