summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJoel Granados <joel.granados@kernel.org>2025-12-04 13:36:57 +0100
committerJoel Granados <joel.granados@kernel.org>2026-01-05 13:36:45 +0100
commit486401052432f1ba1628e1eed59b3e6bfb07b5c1 (patch)
tree0c69410e0beefd30507357769cef94dc1b1c232a /kernel
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
sysctl: Add missing kernel-doc for proc_dointvec_conv
Add kernel-doc documentation for the proc_dointvec_conv function to describe its parameters and return value. Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sysctl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2cd767b9680e..ae937c1b5272 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -862,6 +862,22 @@ int proc_doulongvec_minmax(const struct ctl_table *table, int dir,
return proc_doulongvec_minmax_conv(table, dir, buffer, lenp, ppos, 1l, 1l);
}
+/**
+ * proc_dointvec_conv - read a vector of ints with a custom converter
+ * @table: the sysctl table
+ * @dir: %TRUE if this is a write to the sysctl file
+ * @buffer: the user buffer
+ * @lenp: the size of the user buffer
+ * @ppos: file position
+ * @conv: Custom converter call back
+ *
+ * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
+ * values from/to the user buffer, treated as an ASCII string. Negative
+ * strings are not allowed.
+ *
+ * Returns: 0 on success
+ */
+
int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer,
size_t *lenp, loff_t *ppos,
int (*conv)(bool *negp, unsigned long *u_ptr, int *k_ptr,