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=1796384798; b=RXT9OJry3XrwOVOhih8iZKBLaO1wNFtTEIfLqMBccaFVqclzTBFf98jEfKkVkAHTi/qe romTuqEHsZL3BNZNmEjoFwRRUzNIZunOGC5Lhds0Jn8o3AQzT4tPif77xfaejwPlMfD+i LE2zc+7WYBy3epw0QA9YukLfMmVw5NxGE/YbJa2Czh3IsQzgIzV+s90o9iGjLsStmAGTf T9Tyw2Rr2RzrK/Ub8eVGfxxBHAi4OJWRKhL3n56HGuBxgH1L/j6KuuqMFNfoiw1YWQM2h iv+ju+cNSrlT0g92TdcMArXd+DkP9qLZbIZZ14n3r4wr5rg3/quyidUbi5nV44ByJfw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384798; 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=zDyG5+s1A6Rzam+yehqwTbV6bty6DqG+1xOGIv9c+f0=; b=dOLsbMUYwsNOSymL8QXNYvQrNtMd49CtmzQvPqZFiBu2vpm1dQ2yzYh9WS2cB+umpqpU SPCx4sdIjxAqd8iVN4elUlUvgEoxQltmq4e6S/4jiRnKeUHQKmlDDwHK2kEsxK55lpo99 sknO670GF1ZDB1SkTV3O0UA+BwyIZ9gINgAMwQd/KFU2PRnstB2di8Rr9/Ppqvlwa0rWR sps1VuQhB3zHe6RQGRIHc0vCKd6HtrJyZlpQaB7EYzeOHAWg9kcsKm+LWwTJCVJ4cZuM9 xP6euK5zTI44/Nva4Ao7GUckeSMxdyf7gjL7VrFivpPNKQUFCaHJtVOVsdqrGivUzFw== 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=aC4cUsXL; 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 8899D606A322; Fri, 4 Dec 2026 11:46:38 +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=aC4cUsXL Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC3551F000CE; Fri, 4 Dec 2026 11:46:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384798; bh=zDyG5+s1A6Rzam+yehqwTbV6bty6DqG+1xOGIv9c+f0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aC4cUsXLQyWRcRCduYkn3+atJtfeVNzr89givYmeAlSW4UKiKqrYktNOyiAoJTpfs 4Qqv1KyME0aGrR3QuMMI6H6hsVxlJwpxPHNSlYFKj/m3eVbqR45B/bbs/LzpOgoYsG RZw3PCmkdtp+pWU6l6i0gj6VZJdpB7TH1zTfcbAs= 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.6 0281/1167] crypto: omap-des - fix crypto engine cleanup Date: Fri, 4 Dec 2026 18:55:08 +0900 Message-ID: <20261204100709.368051301@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 tree's tasklet_kill() context line instead of upstream's cancel_work_sync() and inserted the crypto_engine_exit() call 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 c5e7064be9c55..d689a15edffc0 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -1092,6 +1092,8 @@ static int omap_des_remove(struct platform_device *pdev) omap_des_unregister_algs(dd->pdata); + crypto_engine_exit(dd->engine); + tasklet_kill(&dd->done_task); omap_des_dma_cleanup(dd); pm_runtime_disable(dd->dev); -- 2.53.0