FAILED: patch "[PATCH] crypto: omap-des - fix crypto engine cleanup" failed to apply to 5.10-stable tree
Subsystems (2)
Sasha Levin
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 5d69ed4cd4f9c68ff9a6ebb2e8a1079223a4ec6e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 5d69ed4cd4f9c68ff9a6ebb2e8a1079223a4ec6e Mon Sep 17 00:00:00 2001
From: Guangshuo Li <[email protected]>
Date: Sat, 12 Sep 2026 22:41:16 +0800
Subject: [PATCH] crypto: omap-des - fix crypto engine cleanup
omap_des_probe() allocates and starts a crypto engine, but the remove path does not call the matching crypto_engine_exit(). The probe failure path already performs this cleanup.
crypto_engine_alloc_init() creates a kthread worker for processing requests. Without crypto_engine_exit() during driver removal, the worker is left running after the device is removed.
Call crypto_engine_exit() after unregistering the algorithms and before tearing down the remaining request handling resources. This stops the engine and destroys its worker.
This issue was found by manual code inspection.
--- drivers/crypto/omap-des.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/crypto/omap-des.c +2 -0
@@ -1082,6 +1082,8 @@ static void omap_des_remove(struct platform_device *pdev)omap_des_unregister_algs (dd->pdata); +crypto_engine_exit (dd->engine); +cancel_work_sync (&dd->done_task);omap_des_dma_cleanup (dd);pm_runtime_disable (dd->dev);
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 crypto: omap-des - fix crypto engine cleanup
From: Guangshuo Li <[email protected]>
[ Upstream commit 5d69ed4cd4f9c68ff9a6ebb2e8a1079223a4ec6e ]
omap_des_probe() allocates and starts a crypto engine, but the remove path does not call the matching crypto_engine_exit(). The probe failure path already performs this cleanup.
crypto_engine_alloc_init() creates a kthread worker for processing requests. Without crypto_engine_exit() during driver removal, the worker is left running after the device is removed.
Call crypto_engine_exit() after unregistering the algorithms and before tearing down the remaining request handling resources. This stops the engine and destroys its worker.
This issue was found by manual code inspection.
--- drivers/crypto/omap-des.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/crypto/omap-des.c +2 -0
@@ -1105,6 +1105,8 @@ static int omap_des_remove(struct platform_device *pdev)crypto_unregister_skcipher ( &dd->pdata->algs_info[i].algs_list[j]); +crypto_engine_exit (dd->engine); +tasklet_kill (&dd->done_task);omap_des_dma_cleanup (dd);pm_runtime_disable (dd->dev);
Signature · 1 line
2.53.0