FAILED: patch "[PATCH] media: mc: Clear minor number before put device" failed to apply to 5.10-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.10-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.10.y
git checkout FETCH_HEAD
git cherry-pick -x 8cfc8cec1b4da88a47c243a11f384baefd092a50
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025101339-polygraph-crept-0130@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8cfc8cec1b4da88a47c243a11f384baefd092a50 Mon Sep 17 00:00:00 2001
From: Edward Adam Davis <[email protected]>
Date: Wed, 10 Sep 2025 09:15:27 +0800
Subject: [PATCH] media: mc: Clear minor number before put device
The device minor should not be cleared after the device is released.
drivers/media/mc/mc-devnode.c +1 -4
@@ -276,13 +276,10 @@ void media_devnode_unregister(struct media_devnode *devnode)/* Delete the cdev on this minor as well */ cdev_device_del (&devnode->cdev, &devnode->dev); devnode->media_dev =NULL ; +clear_bit (devnode->minor, media_devnode_nums);mutex_unlock (&media_devnode_lock);put_device (&devnode->dev); - -mutex_lock (&media_devnode_lock); -clear_bit (devnode->minor, media_devnode_nums); -mutex_unlock (&media_devnode_lock); }/*
Sasha Levin
maintainerPATCH 1/1 media: mc: Clear minor number before put device
From: Edward Adam Davis <[email protected]>
[ Upstream commit 8cfc8cec1b4da88a47c243a11f384baefd092a50 ]
The device minor should not be cleared after the device is released.
--- drivers/media/mc/mc-devnode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/media/mc/mc-devnode.c +1 -5
@@ -50,11 +50,6 @@ static void media_devnode_release(struct device *cd) {struct media_devnode *devnode =to_media_devnode (cd); -mutex_lock (&media_devnode_lock); -/* Mark device node number as free */ -clear_bit (devnode->minor, media_devnode_nums); -mutex_unlock (&media_devnode_lock); -/* Release media_devnode and perform other cleanups as needed. */ if (devnode->release) devnode->release (devnode);
@@ -283,6 +278,7 @@ void media_devnode_unregister(struct media_devnode *devnode)/* Delete the cdev on this minor as well */ cdev_device_del (&devnode->cdev, &devnode->dev); devnode->media_dev =NULL ; +clear_bit (devnode->minor, media_devnode_nums);mutex_unlock (&media_devnode_lock);put_device (&devnode->dev);
Signature · 1 line
2.51.0