From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7D2C5237AD for ; Wed, 9 Sep 2026 10:55:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788951311; cv=none; b=h0GgsykyGXBK8xoSQR6ysBC1duMIrUkqX8j1ksK1aw1cp9YJsQq4YN5EeFtc28xDyy1Y5bNjHeLfy+i3D7xTNKr+mjo90TMJjkVnS/1Rp8b++V6cp+IcU93uVnXrwpUpfICMjEnv8W708LwMhERcrO0J+fVjgrzvS4WnVbR3tQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788951311; c=relaxed/simple; bh=MQNnf2ZZWpIOjqAtVGk8nCd/0/QjLS19aPwkF9VBGmM=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=XJazXktN457AVxkXL2otjARQc6B9XVGgJ5rTD3ZlJt0Mko6H50x1Dpz4hPDwYrbq8yC02tChi5awjUsAEkMB06Om96lcXaK4FRW2BJFApDO79P0DofZsY3tJ8RhDFWQG2Nha1A+haJ+j14x6IGbVnjj/g/E3bIuZzMquenVq1Pc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Tye3RnH/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Tye3RnH/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18CBB1F00A3A; Wed, 9 Sep 2026 10:55:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788951309; bh=mRoWuPjVaJ1fFGkz9pcqY1WCqiq21FXEEJ6/SVclu1M=; h=Subject:To:Cc:From:Date; b=Tye3RnH/1D3DaZz+Y2rnV+O1MgtaSVZeoIJgUUuCFoATX1AWPlOi9RpqoS9Nrji0J IvnLxfYq/7TAf5/WQoNclA+GKS8TDxJwZAPFcVJCobzj93fg+C9wxAXzd4CTB4Jxtm nUUk/X5ce360/+isXTagle50sEOx+m+kGBhXl8KA= Subject: FAILED: patch "[PATCH] media: platform: mtk-mdp3: fix NULL deref on failed SCP" failed to apply to 6.1-stable tree To: johan@kernel.org,hverkuil+cisco@kernel.org,moudy.ho@mediatek.com,nicolas.dufresne@collabora.com Cc: From: Date: Wed, 09 Sep 2026 12:47:02 +0200 Message-ID: <2026090902-unify-stoppage-ec5d@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The 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 . 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 # git commit -s git send-email --to '' --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 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. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Cc: stable@vger.kernel.org # 6.1 Cc: Moudy Ho Signed-off-by: Johan Hovold Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c index 121b1006ffdc..f412aadb5996 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c @@ -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);