Skip to content

Commit 11400f8

Browse files
committed
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>
1 parent f7386f5 commit 11400f8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

kernel/sysctl.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,14 @@ int proc_douintvec_minmax(const struct ctl_table *table, int dir,
10711071
return -ENOSYS;
10721072
}
10731073

1074+
int proc_douintvec_conv(const struct ctl_table *table, int write, void *buffer,
1075+
size_t *lenp, loff_t *ppos,
1076+
int (*conv)(unsigned long *lvalp, unsigned int *valp,
1077+
int write, const struct ctl_table *table))
1078+
{
1079+
return -ENOSYS;
1080+
}
1081+
10741082
int proc_dou8vec_minmax(const struct ctl_table *table, int dir,
10751083
void *buffer, size_t *lenp, loff_t *ppos)
10761084
{

0 commit comments

Comments
 (0)