sunxi-6.1: Revert: handle entropy from atomic process context

Revert 07b37f227c8daa27e68f57b1c691fab34a06731e commit
For the sunxi (armhf) architecture, this commit results in
an inability to load the kernel. It's actually a crutch
that can break everything tomorrow.
Therefore, freeze the kernel version for better times.
This commit is contained in:
The-going 2024-07-07 10:47:24 +03:00 committed by Igor
parent 2d7cbfa7c1
commit 75317a0778
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,52 @@
From 25ba88c95e844f900f5603890eaab8d19792a6a8 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Sun, 7 Jul 2024 10:39:48 +0300
Subject: [PATCH] random: Revert: handle entropy from atomic process context
Revert 07b37f227c8daa27e68f57b1c691fab34a06731e commit
For the sunxi architecture, this commit results in
an inability to load the kernel. It's actually a crutch
that can break everything tomorrow.
Therefore, freeze the kernel version for better times.
---
drivers/char/random.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index fd57eb372..5d1c8e1c9 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -683,7 +683,7 @@ static void extract_entropy(void *buf, size_t len)
static void __cold _credit_init_bits(size_t bits)
{
- static DECLARE_WORK(set_ready, crng_set_ready);
+ static struct execute_work set_ready;
unsigned int new, orig, add;
unsigned long flags;
@@ -699,8 +699,8 @@ static void __cold _credit_init_bits(size_t bits)
if (orig < POOL_READY_BITS && new >= POOL_READY_BITS) {
crng_reseed(); /* Sets crng_init to CRNG_READY under base_crng.lock. */
- if (static_key_initialized && system_unbound_wq)
- queue_work(system_unbound_wq, &set_ready);
+ if (static_key_initialized)
+ execute_in_process_context(crng_set_ready, &set_ready);
wake_up_interruptible(&crng_init_wait);
kill_fasync(&fasync, SIGIO, POLL_IN);
pr_notice("crng init done\n");
@@ -870,8 +870,8 @@ void __init random_init(void)
/*
* If we were initialized by the cpu or bootloader before jump labels
- * or workqueues are initialized, then we should enable the static
- * branch here, where it's guaranteed that these have been initialized.
+ * are initialized, then we should enable the static branch here, where
+ * it's guaranteed that jump labels have been initialized.
*/
if (!static_branch_likely(&crng_is_ready) && crng_init >= CRNG_READY)
crng_set_ready(NULL);
--
2.35.3

View File

@ -190,3 +190,4 @@
patches.armbian/drivers-hack-for-h616-hdmi-video-output.patch
patches.armbian/arm64-dts-h616-add-hdmi-support-for-zero2.patch
patches.armbian/arm64-dts-sun50i-h616-Add-dma-node.patch
patches.armbian/random-Revert-handle-entropy-from-atomic-process-con.patch

View File

@ -594,3 +594,4 @@
patches.armbian/drivers-hack-for-h616-hdmi-video-output.patch
patches.armbian/arm64-dts-h616-add-hdmi-support-for-zero2.patch
patches.armbian/arm64-dts-sun50i-h616-Add-dma-node.patch
patches.armbian/random-Revert-handle-entropy-from-atomic-process-con.patch