diff options
author | 2025-02-24 10:58:17 +0100 | |
---|---|---|
committer | 2025-03-10 09:11:13 -0400 | |
commit | 87480a8ce567340a518d992678224c09afab5f11 (patch) | |
tree | d6ced69b3f74a859c4c5361628f76626f56d71b4 | |
parent | nfsd: use a long for the count in nfsd4_state_shrinker_count() (diff) | |
download | wireguard-linux-87480a8ce567340a518d992678224c09afab5f11.tar.xz wireguard-linux-87480a8ce567340a518d992678224c09afab5f11.zip |
sysctl: Fixes nsm_local_state bounds
Bound nsm_local_state sysctl writings between SYSCTL_ZERO
and SYSCTL_INT_MAX.
The proc_handler has thus been updated to proc_dointvec_minmax.
Signed-off-by: Nicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr>
[ cel: updated to handle zero - UINT_MAX instead ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | fs/lockd/svc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 256284669aaa..e80262a51884 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -467,9 +467,10 @@ static const struct ctl_table nlm_sysctls[] = { { .procname = "nsm_local_state", .data = &nsm_local_state, - .maxlen = sizeof(int), + .maxlen = sizeof(nsm_local_state), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_douintvec, + .extra1 = SYSCTL_ZERO, }, }; |