summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Granados <joel.granados@kernel.org>2025-12-08 16:33:17 +0300
committerJoel Granados <joel.granados@kernel.org>2026-01-05 16:10:32 +0300
commit11400f86c28eaeb8d0cc22fef3f16fdd87d46214 (patch)
tree6e7ae40ceb22956e7829a61dff8d861a25fc3775
parentf7386f545e49e5e6229a14d92b39340d155b0b3f (diff)
downloadlinux-11400f86c28eaeb8d0cc22fef3f16fdd87d46214.tar.xz
sysctl: Return -ENOSYS from proc_douintvec_conv when CONFIG_PROC_SYSCTL=n
Ensure an error if prco_douintvec_conv is erroneously called in a system with CONFIG_PROC_SYSCTL=n Signed-off-by: Joel Granados <joel.granados@kernel.org>
-rw-r--r--kernel/sysctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ae937c1b5272..e9bc1161ecfb 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1071,6 +1071,14 @@ int proc_douintvec_minmax(const struct ctl_table *table, int dir,
return -ENOSYS;
}
+int proc_douintvec_conv(const struct ctl_table *table, int write, void *buffer,
+ size_t *lenp, loff_t *ppos,
+ int (*conv)(unsigned long *lvalp, unsigned int *valp,
+ int write, const struct ctl_table *table))
+{
+ return -ENOSYS;
+}
+
int proc_dou8vec_minmax(const struct ctl_table *table, int dir,
void *buffer, size_t *lenp, loff_t *ppos)
{