FAILED: patch "[PATCH] media: platform: mtk-mdp3: fix NULL deref on failed SCP" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-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 <[email protected]>.
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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 90368323fb244da0504e3da37a182f8e89bcc3b9
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090902-unify-stoppage-ec5d@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 90368323fb244da0504e3da37a182f8e89bcc3b9 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 6 Jul 2026 08:59:27 +0200
Subject: [PATCH] media: platform: mtk-mdp3: fix NULL deref on failed SCP
lookup
Add the missing sanity check after looking up the SCP to avoid dereferencing a NULL-pointer in case its driver has not yet been bound.
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c +5 -0
@@ -296,6 +296,11 @@ static int mdp_probe(struct platform_device *pdev) mdp->scp =platform_get_drvdata (mm_pdev); } +if (!mdp->scp) { + ret = -EPROBE_DEFER ; + goto err_destroy_clock_wq; + } + mdp->rproc_handle =scp_get_rproc (mdp->scp);dev_dbg (&pdev->dev,"MDP rproc_handle: %p" , mdp->rproc_handle);
Sasha Levin
maintainerPATCH 1/1 media: platform: mtk-mdp3: fix NULL deref on failed SCP lookup
From: Johan Hovold <[email protected]>
[ Upstream commit 90368323fb244da0504e3da37a182f8e89bcc3b9 ]
Add the missing sanity check after looking up the SCP to avoid dereferencing a NULL-pointer in case its driver has not yet been bound.
--- drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c +5 -0
@@ -241,6 +241,11 @@ static int mdp_probe(struct platform_device *pdev) goto err_destroy_clock_wq; } mdp->scp =platform_get_drvdata (mm_pdev); +if (!mdp->scp) { + ret = -EPROBE_DEFER ; + goto err_destroy_clock_wq; + } + mdp->rproc_handle =scp_get_rproc (mdp->scp);dev_dbg (&pdev->dev,"MDP rproc_handle: %pK" , mdp->rproc_handle);
Signature · 1 line
2.53.0