From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1AD683C5528 for ; Tue, 17 Mar 2026 12:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773751992; cv=none; b=Iy6V7wJ0klFboObGhWm2bfVBMYMkpQMGxLI/h26U3myQRwm2CDiij4OioPR886mBHFd8g++0fZ7hyrmW3kzF4samKNbhwipcNFfa4MUa+dEN2t/HgDJd5XdNG6vTAvaLcWu1rJydMhqAYCNVw2Auc3UTX0JdD0pLToMAa39ATwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773751992; c=relaxed/simple; bh=G6HzOeRjaW5AlTe1gzzc0YopxgUEn0vhJlq0BMrlrgs=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ZZg9jRXPSPI2ds/6qzM6/depMHDsCJFy1WBb/Lcb+/yuJBNWMpYx3cbQbIZsqhzx/Qe1RzH7nFHb5zFhvSCh42e2TCwDi5i9RqhKwpgkOBXcP7T8TOBnLAVNAl9L8CS4weH+9QkVTy4ZjtMDlPQ5L5aQEDyx33GgHr7ESZFMdO0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s+FV3iTe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="s+FV3iTe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CFD8C4CEF7; Tue, 17 Mar 2026 12:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773751991; bh=G6HzOeRjaW5AlTe1gzzc0YopxgUEn0vhJlq0BMrlrgs=; h=Subject:To:Cc:From:Date:From; b=s+FV3iTeoNHgccAcpwJPoj4/DAID+6NqTT9owxaCrPBVwZb4qAdT14VRw2d2E+oJ6 7a6U5f+mGzmvuOb6GYh+fUkAGWCc9aC/VSGQvaH1CnoZyTeMWMyGIKDWqM8qHITmw5 nXmelj8MpoTxFWmxgRe3Mjv9BIRqzqB8PhP7amdI= Subject: FAILED: patch "[PATCH] crypto: atmel-sha204a - Fix OOM ->tfm_count leak" failed to apply to 6.12-stable tree To: thorsten.blum@linux.dev,herbert@gondor.apana.org.au Cc: From: Date: Tue, 17 Mar 2026 13:53:00 +0100 Message-ID: <2026031700-perky-strainer-67d6@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-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 . 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-6.12.y git checkout FETCH_HEAD git cherry-pick -x d240b079a37e90af03fd7dfec94930eb6c83936e # git commit -s git send-email --to '' --in-reply-to '2026031700-perky-strainer-67d6@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From d240b079a37e90af03fd7dfec94930eb6c83936e Mon Sep 17 00:00:00 2001 From: Thorsten Blum Date: Thu, 19 Feb 2026 00:54:00 +0100 Subject: [PATCH] crypto: atmel-sha204a - Fix OOM ->tfm_count leak If memory allocation fails, decrement ->tfm_count to avoid blocking future reads. Cc: stable@vger.kernel.org Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator") Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c index 8adc7fe71c04..98d1023007e3 100644 --- a/drivers/crypto/atmel-sha204a.c +++ b/drivers/crypto/atmel-sha204a.c @@ -52,9 +52,10 @@ static int atmel_sha204a_rng_read_nonblocking(struct hwrng *rng, void *data, rng->priv = 0; } else { work_data = kmalloc_obj(*work_data, GFP_ATOMIC); - if (!work_data) + if (!work_data) { + atomic_dec(&i2c_priv->tfm_count); return -ENOMEM; - + } work_data->ctx = i2c_priv; work_data->client = i2c_priv->client;