Skip to content

Commit 172d513

Browse files
committed
Merge tag 'sysctl-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl
Pull sysctl update from Joel Granados: - Avoid evaluating non-mount ctl_tables as a sysctl_mount_point by removing the unlikely (but possible) chance that the permanently empty ctl_table array shares its address with another ctl_table - Update Joel Granados' contact info in MAINTAINERS * tag 'sysctl-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: MAINTAINERS: update email for Joel Granados sysctl: avoid spurious permanent empty tables
2 parents 97d8894 + 732b47d commit 172d513

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ Jiri Slaby <[email protected]> <[email protected]>
316316
317317
318318
319+
319320
320321
321322

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18507,7 +18507,7 @@ F: tools/testing/selftests/proc/
1850718507
PROC SYSCTL
1850818508
M: Luis Chamberlain <[email protected]>
1850918509
M: Kees Cook <[email protected]>
18510-
M: Joel Granados <j.granados@samsung.com>
18510+
M: Joel Granados <joel.granados@kernel.org>
1851118511
1851218512
1851318513
S: Maintained

fs/proc/proc_sysctl.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ static const struct inode_operations proc_sys_inode_operations;
2929
static const struct file_operations proc_sys_dir_file_operations;
3030
static const struct inode_operations proc_sys_dir_operations;
3131

32-
/* Support for permanently empty directories */
33-
static struct ctl_table sysctl_mount_point[] = { };
32+
/*
33+
* Support for permanently empty directories.
34+
* Must be non-empty to avoid sharing an address with other tables.
35+
*/
36+
static struct ctl_table sysctl_mount_point[] = {
37+
{ }
38+
};
3439

3540
/**
3641
* register_sysctl_mount_point() - registers a sysctl mount point
@@ -42,7 +47,7 @@ static struct ctl_table sysctl_mount_point[] = { };
4247
*/
4348
struct ctl_table_header *register_sysctl_mount_point(const char *path)
4449
{
45-
return register_sysctl(path, sysctl_mount_point);
50+
return register_sysctl_sz(path, sysctl_mount_point, 0);
4651
}
4752
EXPORT_SYMBOL(register_sysctl_mount_point);
4853

0 commit comments

Comments
 (0)