Skip to content

Commit 73184c8

Browse files
committed
sysctl: rename kern_table -> sysctl_subsys_table
Renamed sysctl table from kern_table to sysctl_subsys_table and grouped the two arch specific ctls to the end of the array. 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 <[email protected]>
1 parent 25ebbce commit 73184c8

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

kernel/sys.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ static int __init init_overflow_sysctl(void)
210210

211211
postcore_initcall(init_overflow_sysctl);
212212

213-
214213
/*
215214
* Returns true if current's euid is same as p's uid or euid,
216215
* or has CAP_SYS_NICE to p's user_ns.

kernel/sysctl.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ int proc_do_static_key(const struct ctl_table *table, int write,
14541454
return ret;
14551455
}
14561456

1457-
static const struct ctl_table kern_table[] = {
1457+
static const struct ctl_table sysctl_subsys_table[] = {
14581458
#ifdef CONFIG_PROC_SYSCTL
14591459
{
14601460
.procname = "sysctl_writes_strict",
@@ -1465,15 +1465,6 @@ static const struct ctl_table kern_table[] = {
14651465
.extra1 = SYSCTL_NEG_ONE,
14661466
.extra2 = SYSCTL_ONE,
14671467
},
1468-
#endif
1469-
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
1470-
{
1471-
.procname = "unaligned-trap",
1472-
.data = &unaligned_enabled,
1473-
.maxlen = sizeof (int),
1474-
.mode = 0644,
1475-
.proc_handler = proc_dointvec,
1476-
},
14771468
#endif
14781469
{
14791470
.procname = "ngroups_max",
@@ -1489,6 +1480,15 @@ static const struct ctl_table kern_table[] = {
14891480
.mode = 0444,
14901481
.proc_handler = proc_dointvec,
14911482
},
1483+
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
1484+
{
1485+
.procname = "unaligned-trap",
1486+
.data = &unaligned_enabled,
1487+
.maxlen = sizeof(int),
1488+
.mode = 0644,
1489+
.proc_handler = proc_dointvec,
1490+
},
1491+
#endif
14921492
#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
14931493
{
14941494
.procname = "ignore-unaligned-usertrap",
@@ -1502,7 +1502,7 @@ static const struct ctl_table kern_table[] = {
15021502

15031503
int __init sysctl_init_bases(void)
15041504
{
1505-
register_sysctl_init("kernel", kern_table);
1505+
register_sysctl_init("kernel", sysctl_subsys_table);
15061506

15071507
return 0;
15081508
}

0 commit comments

Comments
 (0)