From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52AC947044A; Tue, 21 Jul 2026 20:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784665375; cv=none; b=fzstH9E9o75bL0RtAYAXjnzZBLLgmXM+vuMsrhhzJ3DZnsjybJdP582CAFNf1yGwnWTGEhjXGjm0mNmQF1DSw0QCishgFo5vXsa8Xcr4oLdk8Uu0t9iX9APul2Sn4bXBdrpgmNhizFxQunodqAF5k1KdByhu0ivkuK9c27YZ6qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784665375; c=relaxed/simple; bh=vulRC8s0tQNC4ByZBipIJY0+lrY2+/SMDfaL0AvxJ+g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Us4wTrT1DvhUFvv1zeja7iv1f7tTycdjGkHmEqLaITvqnFUKLIG5aNE5OpZ0sAS2rCw+YK0WI7XZolpBcU7FvcHQU68RDiLk9c5gNS0nWTEEdsk86YkKsFijivAvUB8JqP4gPfzhCx9uujRZDnvhgfdy7KRJiQa8nyEHBIUy5a0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2Oq8M9S8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2Oq8M9S8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9D691F00A3A; Tue, 21 Jul 2026 20:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784665374; bh=8Leqe3lt53Pg/tFwbRsrRF+SJ9piaMGvxDFolTvPunk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2Oq8M9S8eez9Vuht/jZY5ogbjMSCqpYIF8byYW8NKGjgwYV/JkXDYbPTV4uKYIYkN UNQT3JPuC4MUv1TjMnoiVgrJQP7nJHG6Zn/AC7QqjBUn5zOvjn4sHtTJIxxm/qtKWp 4Atn/XWQnoSqB1pRZZXoRta10SZWxwjiOAJ3YVXg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable@kernel.org, Yuan Tan , Yifan Wu , Juefei Pu , Zhengchuan Liang , Xin Liu , Ruijie Li , Ren Wei , Herbert Xu Subject: [PATCH 6.6 0273/1266] crypto: pcrypt - restore callback for non-parallel fallback Date: Tue, 21 Jul 2026 17:11:50 +0200 Message-ID: <20260721152447.929720578@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152441.786066624@linuxfoundation.org> References: <20260721152441.786066624@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ruijie Li commit ed459fe319376e876de433d12b6c6772e612ca36 upstream. pcrypt installs pcrypt_aead_done() on the child AEAD request before trying to submit it through padata. If padata_do_parallel() returns -EBUSY, pcrypt falls back to calling the child AEAD directly. That fallback must not keep the padata completion callback. Otherwise an asynchronous completion runs pcrypt_aead_done() even though the request was never enrolled in padata. Restore the original request callback and callback data before calling the child AEAD directly. This keeps the fallback path aligned with a direct AEAD request while leaving the parallel path unchanged. Fixes: 662f2f13e66d ("crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY") Cc: stable@kernel.org Reported-by: Yuan Tan Reported-by: Yifan Wu Reported-by: Juefei Pu Reported-by: Zhengchuan Liang Reported-by: Xin Liu Assisted-by: Codex:gpt-5.4 Signed-off-by: Ruijie Li Signed-off-by: Ren Wei Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/pcrypt.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c @@ -122,6 +122,8 @@ static int pcrypt_aead_encrypt(struct ae return -EINPROGRESS; if (err == -EBUSY) { /* try non-parallel mode */ + aead_request_set_callback(creq, flags, req->base.complete, + req->base.data); return crypto_aead_encrypt(creq); } @@ -173,6 +175,8 @@ static int pcrypt_aead_decrypt(struct ae return -EINPROGRESS; if (err == -EBUSY) { /* try non-parallel mode */ + aead_request_set_callback(creq, flags, req->base.complete, + req->base.data); return crypto_aead_decrypt(creq); }