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 6DA5B3C660D for ; Tue, 17 Mar 2026 12:53:28 +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=1773752008; cv=none; b=HU45aq2h7+5c4TdRlqqftlqd4hqjvYZOEaYnUsNA4uBzCYSj/IIP8tSIrkxliYBqsoRsY/08guGUllrdS6lsSKmjo56d4yRuy5rHIkzaxkuV1nCbSmvGLCs9N9wP2XxYsxMtLHHhoLCNJvsF3Fec/zbWqJ0UNk6Den7u8DnceH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773752008; c=relaxed/simple; bh=Fb5zLGq0eaYy5neyBodzX/SJgsPhHQ9DJCjqVdMEt/c=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Go4SYoYa8w/61C+YI4sk2S5aIomrFcZBMiG5PayyJPuGHbxejB9t/VOkTRvSWJvdgK6wZ1dCWV3yOVT5cRHMslxfJcQ4YkeeNh3EkbRO4xokAFaNPyFhV112gnVgiOsXXoW5nihfMMLJhjm7WmGGLcqZMZD0RH1p8ARKIcRcvWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2K6axIeG; 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="2K6axIeG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B533C4CEF7; Tue, 17 Mar 2026 12:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773752008; bh=Fb5zLGq0eaYy5neyBodzX/SJgsPhHQ9DJCjqVdMEt/c=; h=Subject:To:Cc:From:Date:From; b=2K6axIeG/+lHHyGCIitmM/nq4Biw3DjIjA27V+X5jTYzsEovtgv9QL7YrcksdH8Ch Y1ZgE2D1MGalP+UOk0zK4hASDZZH3fG/r+hlbutNt5KYqRRPx3dg4CO9z2jiY/lwyu UR/9z4r79d0Ykj0eB52zVPDhf2K3MPQjQUFK+DxE= Subject: FAILED: patch "[PATCH] crypto: atmel-sha204a - Fix OOM ->tfm_count leak" failed to apply to 5.10-stable tree To: thorsten.blum@linux.dev,herbert@gondor.apana.org.au Cc: From: Date: Tue, 17 Mar 2026 13:53:02 +0100 Message-ID: <2026031702-handprint-pelican-170d@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 5.10-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-5.10.y git checkout FETCH_HEAD git cherry-pick -x d240b079a37e90af03fd7dfec94930eb6c83936e # git commit -s git send-email --to '' --in-reply-to '2026031702-handprint-pelican-170d@gregkh' --subject-prefix 'PATCH 5.10.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;