]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
signal: Move signal ctl tables into signal.c
authorJoel Granados <joel.granados@kernel.org>
Mon, 23 Dec 2024 16:11:29 +0000 (17:11 +0100)
committerJoel Granados <joel.granados@kernel.org>
Wed, 9 Apr 2025 11:32:16 +0000 (13:32 +0200)
Move print-fatal-signals into its own const ctl table array in
kernel/signal.c. This is part of a greater effort to move ctl tables
into their respective subsystems which will reduce the merge conflicts
in kernel/sysctl.c.

Signed-off-by: Joel Granados <joel.granados@kernel.org>
kernel/signal.c
kernel/sysctl.c

index f8859faa26c5dfd3008986e6be98a0dedefccd25..148082db9a553dc1cbdb384b9bfbee7889fff06c 100644 (file)
@@ -4981,9 +4981,20 @@ static const struct ctl_table signal_debug_table[] = {
 #endif
 };
 
+static const struct ctl_table signal_table[] = {
+       {
+               .procname       = "print-fatal-signals",
+               .data           = &print_fatal_signals,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+};
+
 static int __init init_signal_sysctls(void)
 {
        register_sysctl_init("debug", signal_debug_table);
+       register_sysctl_init("kernel", signal_table);
        return 0;
 }
 early_initcall(init_signal_sysctls);
index 7c12bbdca51ac4a6010f19a0f87c24e471bef424..811c50072e03c9479a3e246573942469850a81d4 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/module.h>
 #include <linux/sysctl.h>
 #include <linux/bitmap.h>
-#include <linux/signal.h>
 #include <linux/printk.h>
 #include <linux/proc_fs.h>
 #include <linux/security.h>
@@ -1604,13 +1603,6 @@ static const struct ctl_table kern_table[] = {
                .extra2         = SYSCTL_ONE,
        },
 #endif
-       {
-               .procname       = "print-fatal-signals",
-               .data           = &print_fatal_signals,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
 #ifdef CONFIG_SPARC
        {
                .procname       = "reboot-cmd",