Commit 172d5139 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 97d8894b 732b47db
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -316,6 +316,7 @@ Jiri Slaby <jirislaby@kernel.org> <xslaby@fi.muni.cz>
Jisheng Zhang <jszhang@kernel.org> <jszhang@marvell.com>
Jisheng Zhang <jszhang@kernel.org> <Jisheng.Zhang@synaptics.com>
Jishnu Prakash <quic_jprakash@quicinc.com> <jprakash@codeaurora.org>
Joel Granados <joel.granados@kernel.org> <j.granados@samsung.com>
Johan Hovold <johan@kernel.org> <jhovold@gmail.com>
Johan Hovold <johan@kernel.org> <johan@hovoldconsulting.com>
John Crispin <john@phrozen.org> <blogic@openwrt.org>
+1 −1
Original line number Diff line number Diff line
@@ -18507,7 +18507,7 @@ F: tools/testing/selftests/proc/
PROC SYSCTL
M:	Luis Chamberlain <mcgrof@kernel.org>
M:	Kees Cook <kees@kernel.org>
M:	Joel Granados <j.granados@samsung.com>
M:	Joel Granados <joel.granados@kernel.org>
L:	linux-kernel@vger.kernel.org
L:	linux-fsdevel@vger.kernel.org
S:	Maintained
+8 −3
Original line number Diff line number Diff line
@@ -29,8 +29,13 @@ static const struct inode_operations proc_sys_inode_operations;
static const struct file_operations proc_sys_dir_file_operations;
static const struct inode_operations proc_sys_dir_operations;

/* Support for permanently empty directories */
static struct ctl_table sysctl_mount_point[] = { };
/*
 * Support for permanently empty directories.
 * Must be non-empty to avoid sharing an address with other tables.
 */
static struct ctl_table sysctl_mount_point[] = {
	{ }
};

/**
 * register_sysctl_mount_point() - registers a sysctl mount point
@@ -42,7 +47,7 @@ static struct ctl_table sysctl_mount_point[] = { };
 */
struct ctl_table_header *register_sysctl_mount_point(const char *path)
{
	return register_sysctl(path, sysctl_mount_point);
	return register_sysctl_sz(path, sysctl_mount_point, 0);
}
EXPORT_SYMBOL(register_sysctl_mount_point);