sysctl-add-helper-to-register-a-sysctl-mount-point.patch removed from -mm tree
The patch titled
Subject: sysctl: add helper to register a sysctl mount point
has been removed from the -mm tree. Its filename was
sysctl-add-helper-to-register-a-sysctl-mount-point.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Luis Chamberlain <[email protected]>
Subject: sysctl: add helper to register a sysctl mount point
The way to create a subdirectory on top of sysctl_mount_point is a bit obscure, and *why* we do that even so more. Provide a helper which makes it clear why we do this.
[[email protected]: export register_sysctl_mount_point() to modules]
Signed-off-by Luis Chamberlain <[email protected]>
Suggested-by "Eric W. Biederman" <[email protected]>
Cc Al Viro <[email protected]>
Cc Amir Goldstein <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Antti Palosaari <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Benjamin LaHaise <[email protected]>
Cc Clemens Ladisch <[email protected]>
Cc David Airlie <[email protected]>
Cc Douglas Gilbert <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jan Kara <[email protected]>
Cc Joel Becker <[email protected]>
Cc John Ogness <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Kees Cook <[email protected]>
Cc Lukas Middendorf <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Martin K. Petersen <[email protected]>
Cc Paul Turner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Phillip Potter <[email protected]>
Cc Qing Wang <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Stephen Kitt <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Tetsuo Handa <[email protected]>
Cc "Theodore Ts'o" <[email protected]>
Cc Xiaoming Ni <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
fs/proc/proc_sysctl.c | 14 ++++++++++++++ include/linux/sysctl.h | 7 +++++++ 2 files changed, 21 insertions(+)
fs/proc/proc_sysctl.c renamed from fs/proc/proc_sysctl.c~sysctl-add-helper-to-register-a-sysctl-mount-point +14 -0
@@ -35,6 +35,20 @@ struct ctl_table sysctl_mount_point[] = { } }; +/** +* register_sysctl_mount_point() - registers a sysctl mount point +* @path: path for the mount point +* +* Used to create a permanently empty directory to serve as mount point. +* There are some subtle but important permission checks this allows in the +* case of unprivileged mounts. +*/ +struct ctl_table_header *register_sysctl_mount_point (const char *path) +{ +return register_sysctl (path, sysctl_mount_point); +} +EXPORT_SYMBOL (register_sysctl_mount_point); +static bool is_empty_dir (struct ctl_table_header *head) {return head->ctl_table[0 ].child == sysctl_mount_point;
include/linux/sysctl.h renamed from include/linux/sysctl.h~sysctl-add-helper-to-register-a-sysctl-mount-point +7 -0
@@ -209,6 +209,8 @@ extern int sysctl_init(void);extern void __register_sysctl_init (const char *path,struct ctl_table *table,const char *table_name);#define register_sysctl_init (path, table) __register_sysctl_init(path, table, #table) +extern struct ctl_table_header *register_sysctl_mount_point (const char *path); +void do_sysctl_args (void );extern int pwrsw_enabled;
@@ -223,6 +225,11 @@ static inline struct ctl_table_header *r {return NULL ; } + +static inline struct sysctl_header *register_sysctl_mount_point (const char *path) +{ +return NULL ; +}static inline struct ctl_table_header *register_sysctl_paths (const struct ctl_path *path,struct ctl_table *table)
_
Patches currently in -mm which might be from [email protected] are