aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/random.c
diff options
context:
space:
mode:
authorTiwei Bie <[email protected]>2025-03-15 16:19:08 +0000
committerJohannes Berg <[email protected]>2025-03-20 08:28:44 +0000
commit33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc (patch)
tree0ef75011ee477633de8c882d696314eca6fffefb /arch/um/drivers/random.c
parentum: Prohibit the VM_CLONE flag in run_helper_thread() (diff)
downloadkernel-33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc.tar.gz
kernel-33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc.zip
um: Rewrite the sigio workaround based on epoll and tgkill
The existing sigio workaround implementation removes FDs from the poll when events are triggered, requiring users to re-add them via add_sigio_fd() after processing. This introduces a potential race condition between FD removal in write_sigio_thread() and next_poll update in __add_sigio_fd(), and is inefficient due to frequent FD removal and re-addition. Rewrite the implementation based on epoll and tgkill for improved efficiency and reliability. Signed-off-by: Tiwei Bie <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'arch/um/drivers/random.c')
-rw-r--r--arch/um/drivers/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index da985e0dc69a..ca08c91f47a3 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -79,7 +79,7 @@ static int __init rng_init (void)
if (err < 0)
goto err_out_cleanup_hw;
- sigio_broken(random_fd);
+ sigio_broken();
hwrng.name = RNG_MODULE_NAME;
hwrng.read = rng_dev_read;