]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
panic: Move panic ctl tables into panic.c
authorJoel Granados <joel.granados@kernel.org>
Sun, 22 Dec 2024 21:54:15 +0000 (22:54 +0100)
committerJoel Granados <joel.granados@kernel.org>
Wed, 9 Apr 2025 11:32:16 +0000 (13:32 +0200)
Move panic, panic_on_oops, panic_print, panic_on_warn into
kerne/panic.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/panic.c
kernel/sysctl.c

index a3889f38153d965c36dbad5e73d2bd8151fab283..047ea3215312c439950c6ec4674a91572146234d 100644 (file)
@@ -96,6 +96,36 @@ static const struct ctl_table kern_panic_table[] = {
                .extra2         = SYSCTL_ONE,
        },
 #endif
+       {
+               .procname       = "panic",
+               .data           = &panic_timeout,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+       {
+               .procname       = "panic_on_oops",
+               .data           = &panic_on_oops,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+       {
+               .procname       = "panic_print",
+               .data           = &panic_print,
+               .maxlen         = sizeof(unsigned long),
+               .mode           = 0644,
+               .proc_handler   = proc_doulongvec_minmax,
+       },
+       {
+               .procname       = "panic_on_warn",
+               .data           = &panic_on_warn,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
+       },
        {
                .procname       = "warn_limit",
                .data           = &warn_limit,
index 3b7a7308e35b093dfe1bddf971c7e3a59826d705..7c12bbdca51ac4a6010f19a0f87c24e471bef424 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/sysctl.h>
 #include <linux/bitmap.h>
 #include <linux/signal.h>
-#include <linux/panic.h>
 #include <linux/printk.h>
 #include <linux/proc_fs.h>
 #include <linux/security.h>
@@ -1588,13 +1587,6 @@ int proc_do_static_key(const struct ctl_table *table, int write,
 }
 
 static const struct ctl_table kern_table[] = {
-       {
-               .procname       = "panic",
-               .data           = &panic_timeout,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
 #ifdef CONFIG_PROC_SYSCTL
        {
                .procname       = "tainted",
@@ -1772,20 +1764,6 @@ static const struct ctl_table kern_table[] = {
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_MAXOLDUID,
        },
-       {
-               .procname       = "panic_on_oops",
-               .data           = &panic_on_oops,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-       {
-               .procname       = "panic_print",
-               .data           = &panic_print,
-               .maxlen         = sizeof(unsigned long),
-               .mode           = 0644,
-               .proc_handler   = proc_doulongvec_minmax,
-       },
        {
                .procname       = "ngroups_max",
                .data           = (void *)&ngroups_max,
@@ -1837,15 +1815,6 @@ static const struct ctl_table kern_table[] = {
                .proc_handler   = proc_dointvec,
        },
 #endif
-       {
-               .procname       = "panic_on_warn",
-               .data           = &panic_on_warn,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec_minmax,
-               .extra1         = SYSCTL_ZERO,
-               .extra2         = SYSCTL_ONE,
-       },
 #ifdef CONFIG_TREE_RCU
        {
                .procname       = "panic_on_rcu_stall",