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 DF15639768C; Tue, 21 Jul 2026 22:37:29 +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=1784673451; cv=none; b=mNVqS6LVqhQxb+AZHvRoANTcQuOUkuPGuDmNKnyU/3HSgUVhmKwX/Bxjf9xISPB0ysB5UDElsce67qseap4ln8+0MwShyA8abu6pHGRz/3d1tr3+6etTy6tA6fL+cKP06nywrhFPEMP/kqay5NIl2WDkFsWLdWuFF37cKm34WbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784673451; c=relaxed/simple; bh=YUN6R7jo5zaTGoVorrtujUSC0eSs/E1EOreevTusaak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UoULipcntDrfFAcE78OuvhsZT+HO1f4Fgr0u8sJAmcuijVxbAvniy0oJEmfgzDpa4BqPiFxSi6xSezftukaue8L5aD/HXTl//9GGnWsoG2MVJL0BPid3FWCv52ePZHtoZKpVyeEdE3nQjc5OeqFFP2BB8a1W8RN/crx80H7MNAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0mQ91xg8; 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="0mQ91xg8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45AF71F00A3A; Tue, 21 Jul 2026 22:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784673449; bh=+qcxWSfQu2Oe2gUNCOaHsmsMyYPsdCDJ277fzJabNoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0mQ91xg8h9UTP4pHGfnM32QJyt/CEg403zCF3Swh1e/sAZ2ZNz84eA7rSezdEwsiX SCw5smPy2iq/9xr0mrOUVhuyXcgi0jLCVkSP0n0To+rWaNXOxiR0azlnLGbDRa1gZ5 2d8vW2TET+ENjfl7Ryfw8hKUVl57KnGAzHqvYyxg= 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 5.10 130/699] crypto: pcrypt - restore callback for non-parallel fallback Date: Tue, 21 Jul 2026 17:18:09 +0200 Message-ID: <20260721152358.641830942@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152355.667394603@linuxfoundation.org> References: <20260721152355.667394603@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 5.10-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); }