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 631003AE19B for ; Tue, 17 Mar 2026 12:53:03 +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=1773751983; cv=none; b=QcKMXlpi/gWWllAyvwwusYiPrstDpNsbBcboMDGsOuzwLjkI9e+ciMrptQg9U2eiRu/Jz7F+v43E1CYfjQUuUgbXrR9k4jg18Zyq62QS3vFxVIuESGK382Z/OMjtCFXAZAIiZfYHIbHWvj1e5znCoZExWog1wwvQCqenEtsvz+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773751983; c=relaxed/simple; bh=wdad/gNNVEJ0U6QZ94Pw0DD8Txsv80OjOfM1ikDIufc=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=dbiFVwZd0dnbDLrSKmLE/G/qPR3keZJY3WuQ4HaUfjZsA0K/KdWmhuomldozMZKWTMEbulJ5TDCQsghCKjoBBrhqCStzWRZpNIg47cqwg//2wEIwLsMxlu0NR4fM5TzB8gmZMPyY4NoFXiIJh6cCn+jLpYv0r7em9Gfq2yF8EdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HjMYfPRY; 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="HjMYfPRY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5F28C4CEF7; Tue, 17 Mar 2026 12:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773751983; bh=wdad/gNNVEJ0U6QZ94Pw0DD8Txsv80OjOfM1ikDIufc=; h=Subject:To:Cc:From:Date:From; b=HjMYfPRYRybS9ax85gu9lLYCMja/dMxPhsc/MOnMX234cbd/j9X+Ja9xc2VF9lIFx AxJLmqeYjS+qQWl3s8denSi2oSnHMqn9Y2vJNFBc+oWMXYb+gSW9ipsmEaWA3HbrIj Bgfa1xO7z/8M6A0ndY3MCu5PE4ZtjUqVavvHiCGM= Subject: FAILED: patch "[PATCH] crypto: atmel-sha204a - Fix OOM ->tfm_count leak" failed to apply to 6.19-stable tree To: thorsten.blum@linux.dev,herbert@gondor.apana.org.au Cc: From: Date: Tue, 17 Mar 2026 13:52:59 +0100 Message-ID: <2026031759-monoxide-icy-3c87@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.19-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.19.y git checkout FETCH_HEAD git cherry-pick -x d240b079a37e90af03fd7dfec94930eb6c83936e # git commit -s git send-email --to '' --in-reply-to '2026031759-monoxide-icy-3c87@gregkh' --subject-prefix 'PATCH 6.19.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;