random-move-the-random-sysctl-declarations-to-its-own-file.patch removed from -mm tree
The patch titled
Subject: random: move the random sysctl declarations to its own file
has been removed from the -mm tree. Its filename was
random-move-the-random-sysctl-declarations-to-its-own-file.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Xiaoming Ni <[email protected]>
Subject: random: move the random sysctl declarations to its own file
kernel/sysctl.c is a kitchen sink where everyone leaves their dirty dishes, this makes it very difficult to maintain.
To help with this maintenance let's start by moving sysctls to places where they actually belong. The proc sysctl maintainers do not want to know what sysctl knobs you wish to add for your own piece of code, we just care about the core logic.
So move the random sysctls to their own file and use register_sysctl_init().
---
drivers/char/random.c | 14 ++++++++++++-- include/linux/sysctl.h | 1 - kernel/sysctl.c | 5 ----- 3 files changed, 12 insertions(+), 8 deletions(-)
drivers/char/random.c renamed from drivers/char/random.c~random-move-the-random-sysctl-declarations-to-its-own-file +12 -2
@@ -1992,8 +1992,7 @@ static int proc_do_entropy(struct ctl_ta }static int sysctl_poolsize =POOL_BITS ; -extern struct ctl_table random_table[]; -struct ctl_table random_table[] = { +static struct ctl_table random_table[] = { { .procname ="poolsize" , .data = &sysctl_poolsize,
@@ -2055,6 +2054,17 @@ struct ctl_table random_table[] = {#endif { } }; + +/* +* rand_initialize() is called before sysctl_init(), +* so we cannot call register_sysctl_init() in rand_initialize() +*/ +static int __init random_sysctls_init (void ) +{ +register_sysctl_init ("kernel/random" , random_table); +return 0 ; +} +device_initcall (random_sysctls_init);#endif /* CONFIG_SYSCTL */ struct batched_entropy {
include/linux/sysctl.h renamed from include/linux/sysctl.h~random-move-the-random-sysctl-declarations-to-its-own-file +0 -1
@@ -217,7 +217,6 @@ extern int unaligned_dump_stack;extern int no_unaligned_warning;extern struct ctl_table sysctl_mount_point[]; -extern struct ctl_table random_table[];#else /* CONFIG_SYSCTL */ static inline struct ctl_table_header *register_sysctl_table (struct ctl_table * table)
kernel/sysctl.c renamed from kernel/sysctl.c~random-move-the-random-sysctl-declarations-to-its-own-file +0 -5
@@ -2145,11 +2145,6 @@ static struct ctl_table kern_table[] = { .proc_handler = sysctl_max_threads, }, { - .procname = "random", - .mode = 0555, - .child = random_table, - }, - { .procname = "usermodehelper", .mode = 0555, .child = usermodehelper_table,
_
Patches currently in -mm which might be from [email protected] are