@@ -54,14 +54,14 @@ static struct ctl_table crypto_sysctl_table[] = {
.data = &fips_name,
.maxlen = 64,
.mode = 0444,
- .proc_handler = proc_dostring
+ .proc_handler_new = proc_dostring
},
{
.procname = "fips_version",
.data = &fips_version,
.maxlen = 64,
.mode = 0444,
- .proc_handler = proc_dostring
+ .proc_handler_new = proc_dostring
},
{}
};
@@ -972,7 +972,7 @@ static struct ctl_table coredump_sysctls[] = {
.data = core_pattern,
.maxlen = CORENAME_MAX_SIZE,
.mode = 0644,
- .proc_handler = proc_dostring_coredump,
+ .proc_handler_new = proc_dostring_coredump,
},
{
.procname = "core_pipe_limit",
@@ -656,7 +656,7 @@ static struct ctl_table ocfs2_nm_table[] = {
.data = ocfs2_hb_ctl_path,
.maxlen = OCFS2_MAX_HB_CTL_PATH,
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{ }
};
@@ -1132,7 +1132,7 @@ static int sysctl_check_table(const char *path, struct ctl_table_header *header)
struct ctl_table *entry;
int err = 0;
list_for_each_table_entry(entry, header) {
- if ((entry->proc_handler == proc_dostring) ||
+ if ((entry->proc_handler_new == proc_dostring) ||
(entry->proc_handler == proc_dobool) ||
(entry->proc_handler == proc_dointvec) ||
(entry->proc_handler == proc_douintvec) ||
@@ -66,7 +66,7 @@ typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
typedef int proc_handler_new(const struct ctl_table *ctl, int write,
void *buffer, size_t *lenp, loff_t *ppos);
-int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
+int proc_dostring(const struct ctl_table *, int, void *, size_t *, loff_t *);
int proc_dobool(struct ctl_table *table, int write, void *buffer,
size_t *lenp, loff_t *ppos);
int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
@@ -1267,7 +1267,7 @@ static struct ctl_table kern_reboot_table[] = {
.data = &poweroff_cmd,
.maxlen = POWEROFF_CMD_PATH_LEN,
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{
.procname = "ctrl-alt-del",
@@ -2438,7 +2438,7 @@ static struct ctl_table seccomp_sysctl_table[] = {
.data = (void *) &seccomp_actions_avail,
.maxlen = sizeof(seccomp_actions_avail),
.mode = 0444,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{
.procname = "actions_logged",
@@ -205,7 +205,7 @@ static int _proc_do_string(char *data, int maxlen, int write,
return 0;
}
-static void warn_sysctl_write(struct ctl_table *table)
+static void warn_sysctl_write(const struct ctl_table *table)
{
pr_warn_once("%s wrote to %s when file position was not 0!\n"
"This will not be supported in the future. To silence this\n"
@@ -223,7 +223,7 @@ static void warn_sysctl_write(struct ctl_table *table)
* handlers can ignore the return value.
*/
static bool proc_first_pos_non_zero_ignore(loff_t *ppos,
- struct ctl_table *table)
+ const struct ctl_table *table)
{
if (!*ppos)
return false;
@@ -256,7 +256,7 @@ static bool proc_first_pos_non_zero_ignore(loff_t *ppos,
*
* Returns 0 on success.
*/
-int proc_dostring(struct ctl_table *table, int write,
+int proc_dostring(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
if (write)
@@ -1498,7 +1498,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
#else /* CONFIG_PROC_SYSCTL */
-int proc_dostring(struct ctl_table *table, int write,
+int proc_dostring(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
return -ENOSYS;
@@ -1653,7 +1653,7 @@ static struct ctl_table kern_table[] = {
.data = reboot_command,
.maxlen = 256,
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{
.procname = "stop-a",
@@ -1735,7 +1735,7 @@ static struct ctl_table kern_table[] = {
.data = &modprobe_path,
.maxlen = KMOD_PATH_LEN,
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{
.procname = "modules_disabled",
@@ -1754,7 +1754,7 @@ static struct ctl_table kern_table[] = {
.data = &uevent_helper,
.maxlen = UEVENT_HELPER_PATH_LEN,
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
#endif
#ifdef CONFIG_MAGIC_SYSRQ
@@ -121,7 +121,7 @@ static struct ctl_table test_table[] = {
.data = &test_data.string_0001,
.maxlen = sizeof(test_data.string_0001),
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{
.procname = "bitmap_0001",
@@ -148,7 +148,7 @@ static struct ctl_table mptcp_sysctl_table[] = {
.procname = "scheduler",
.maxlen = MPTCP_SCHED_NAME_MAX,
.mode = 0644,
- .proc_handler = proc_dostring,
+ .proc_handler_new = proc_dostring,
},
{
.procname = "close_timeout",
proc_handler_new() prevents the handler function from modifying the ctl_table which then can be put into .rodata. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- crypto/fips.c | 4 ++-- fs/coredump.c | 2 +- fs/ocfs2/stackglue.c | 2 +- fs/proc/proc_sysctl.c | 2 +- include/linux/sysctl.h | 2 +- kernel/reboot.c | 2 +- kernel/seccomp.c | 2 +- kernel/sysctl.c | 14 +++++++------- lib/test_sysctl.c | 2 +- net/mptcp/ctrl.c | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-)