FAILED: patch "[PATCH] media: samsung: exynos4-is: fix potential ABBA deadlock on" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe 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 <[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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 17dc8ccd6dd5ffe30aa9b0d36e2af1389344ce2b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026010542-mockup-flagstone-535a@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 17dc8ccd6dd5ffe30aa9b0d36e2af1389344ce2b Mon Sep 17 00:00:00 2001
From: Marek Szyprowski <[email protected]>
Date: Tue, 14 Oct 2025 12:46:43 +0200
Subject: [PATCH] media: samsung: exynos4-is: fix potential ABBA deadlock on
init
v4l2_device_register_subdev_nodes() must called without taking media_dev->graph_mutex to avoid potential AB-BA deadlock on further subdevice driver initialization.
drivers/media/platform/samsung/exynos4-is/media-dev.c +6 -4
@@ -1399,12 +1399,14 @@ static int subdev_notifier_complete(struct v4l2_async_notifier *notifier)mutex_lock (&fmd->media_dev.graph_mutex); ret =fimc_md_create_links (fmd); -if (ret <0 ) - goto unlock; +if (ret <0 ) { +mutex_unlock (&fmd->media_dev.graph_mutex); +return ret; + } + +mutex_unlock (&fmd->media_dev.graph_mutex); ret =v4l2_device_register_subdev_nodes (&fmd->v4l2_dev); -unlock: -mutex_unlock (&fmd->media_dev.graph_mutex);if (ret <0 )return ret;
Sasha Levin
maintainerPATCH 1/1 media: samsung: exynos4-is: fix potential ABBA deadlock on init
From: Marek Szyprowski <[email protected]>
[ Upstream commit 17dc8ccd6dd5ffe30aa9b0d36e2af1389344ce2b ]
v4l2_device_register_subdev_nodes() must called without taking media_dev->graph_mutex to avoid potential AB-BA deadlock on further subdevice driver initialization.
--- drivers/media/platform/exynos4-is/media-dev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/media/platform/exynos4-is/media-dev.c +6 -4
@@ -1411,12 +1411,14 @@ static int subdev_notifier_complete(struct v4l2_async_notifier *notifier)mutex_lock (&fmd->media_dev.graph_mutex); ret =fimc_md_create_links (fmd); -if (ret <0 ) - goto unlock; +if (ret <0 ) { +mutex_unlock (&fmd->media_dev.graph_mutex); +return ret; + } - ret =v4l2_device_register_subdev_nodes (&fmd->v4l2_dev); -unlock:mutex_unlock (&fmd->media_dev.graph_mutex); + + ret =v4l2_device_register_subdev_nodes (&fmd->v4l2_dev);if (ret <0 )return ret;
Signature · 1 line
2.51.0