From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387400; b=Vimum3a0rpJE2zSI4nBO/ssIjJz4qBuZSxxeMr4dT0XZrucNo6iNJ05GL4KV/JdOEtBL 3vMi8WGhULG272cpvU/EsBosLK3nyWjzkDZd43BJZYk263u75aw7HoYXUXbN4MZuz145X dAfobFn1OVtebXoe9d9EdIftsHvBgIg8LHWLDH7fuHmZKlrt0JDTt7FW1uxprNP9/Qjuh l5H0D76TNmyVkZb/JZFB9UhhKaZB3m78JiX5Sov12Ee9xHm3cGJT0mocw8WnhCMaARcwJ 1Szgd4f60eB1dDpf3KqsfQ65mODeZuw8ohQzamnD1WH8MKd96SE9a/dbenzW/N+Ru8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387400; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=wXWZe63LAhaL7oVUzmo3jbKQlpXXl8kcw8mGuPfsgzA=; b=QtoaLIWwNDfykPdp9YUinZXR6LYLtgCYPN+EfYpAoYzXccHPuPVXb0Xj8Vdiba0OqgXf q983IXmHtVZMUeCQFydafQpf+o43bsDi7VwlJDO9Cm8bfGaLhcsaFyI30pLxYWJyVy4gc WpfzSqQXXjb+nhEZpCgy4TWftqNmpjHU8b0oecPnoZkCVBCqPogwVMeHFvSNY0Ku4iYBm unukbcmPTy530knui6dADba0MywnN4v6YGU2wO21hkv9QBEB7aNTrxErbosjYBFVap3cb hr4v227RnMLYSN2c9GGWFSzt0joJKwOkIltxQzs+VsZ+tSTRlruEIpJXUPaCzKOgW8g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=SY7xUEq5; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4452E606A322; Fri, 4 Dec 2026 12:30:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=SY7xUEq5 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 681DF1F000CE; Fri, 4 Dec 2026 12:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387399; bh=wXWZe63LAhaL7oVUzmo3jbKQlpXXl8kcw8mGuPfsgzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SY7xUEq5Hc39gflAGYPu8QUCX5wqS/YVk00aomqyPE14FyPxYH+xMhNYp2fZuJw4h wJL3PLrs8wpZWB6szQJ8RQ3yB7JtMjWN/VjltrYozzo44/b/2ZupyGcgzYnSoVMKxj EvqHzl+qX+zli5a7N63DLgubGTrAbv5ab08G5BMc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Herbert Xu , Sasha Levin Subject: [PATCH 6.1 0226/1059] crypto: omap-des - fix crypto engine cleanup Date: Fri, 4 Dec 2026 18:55:57 +0900 Message-ID: <20261204100650.131135805@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guangshuo Li [ 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. Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto engine framework") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li Signed-off-by: Herbert Xu [ sashal: Kept the branch's tasklet_kill(&dd->done_task) as context, since upstream's cancel_work_sync() and omap_des_unregister_algs() don't exist here, and added crypto_engine_exit() before it. ] Signed-off-by: Sasha Levin --- drivers/crypto/omap-des.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index f783769ea1107..b699b31072cfa 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -1100,6 +1100,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); -- 2.53.0