]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sysctl: Return -ENOSYS from proc_douintvec_conv when CONFIG_PROC_SYSCTL=n
authorJoel Granados <joel.granados@kernel.org>
Mon, 8 Dec 2025 13:33:17 +0000 (14:33 +0100)
committerJoel Granados <joel.granados@kernel.org>
Mon, 5 Jan 2026 13:10:32 +0000 (14:10 +0100)
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>
kernel/sysctl.c

index ae937c1b527262c2ccfe15786d6cb77853d1c867..e9bc1161ecfb0cfe3da1f78b77fc0121951b58b5 100644 (file)
@@ -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)
 {