summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorGerd Rausch <gerd.rausch@oracle.com>2026-02-25 15:37:49 -0800
committerJoel Granados <joel.granados@kernel.org>2026-03-04 13:48:31 +0100
commit6932256d3a3764f3a5e06e2cb8603be45b6a9fef (patch)
tree6c197a9a3bb99655d4249095385e5e74777d3356 /kernel
parent11439c4635edd669ae435eec308f4ab8a0804808 (diff)
time/jiffies: Fix sysctl file error on configurations where USER_HZ < HZ
Commit 2dc164a48e6fd ("sysctl: Create converter functions with two new macros") incorrectly returns error to user space when jiffies sysctl converter is used. The old overflow check got replaced with an unconditional one: + if (USER_HZ < HZ) + return -EINVAL; which will always be true on configurations with "USER_HZ < HZ". Remove the check; it is no longer needed as clock_t_to_jiffies() returns ULONG_MAX for the overflow case and proc_int_u2k_conv_uop() checks for "> INT_MAX" after conversion Fixes: 2dc164a48e6fd ("sysctl: Create converter functions with two new macros") Reported-by: Colm Harrington <colm.harrington@oracle.com> Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com> Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/jiffies.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index a5c7d15fce72..9daf8c5d9687 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -256,8 +256,6 @@ EXPORT_SYMBOL(proc_dointvec_jiffies);
int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int dir,
void *buffer, size_t *lenp, loff_t *ppos)
{
- if (SYSCTL_USER_TO_KERN(dir) && USER_HZ < HZ)
- return -EINVAL;
return proc_dointvec_conv(table, dir, buffer, lenp, ppos,
do_proc_int_conv_userhz_jiffies);
}