diff options
author | Nicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr> | 2025-02-24 10:58:20 +0100 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2025-03-03 13:49:02 -0500 |
commit | f33cd9b3fd03a791296ab37550ffd26213a90c4e (patch) | |
tree | 764e57110c78afb48a0d57383e8a7d828b71dbd5 /drivers/infiniband/core/ucma.c | |
parent | a1ecb30f90856b0be4168ad51b8875148e285c1f (diff) | |
download | linux-f33cd9b3fd03a791296ab37550ffd26213a90c4e.tar.gz linux-f33cd9b3fd03a791296ab37550ffd26213a90c4e.tar.bz2 linux-f33cd9b3fd03a791296ab37550ffd26213a90c4e.zip |
RDMA/core: Fixes infiniband sysctl bounds
Bound infiniband iwcm and ucma 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>
Link: https://patch.msgid.link/20250224095826.16458-6-nicolas.bouchinet@clip-os.org
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: Joel Granados <joel.granados@kernel.org>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/core/ucma.c')
-rw-r--r-- | drivers/infiniband/core/ucma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 02f1666f3cba..6e700b974033 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -69,7 +69,9 @@ static struct ctl_table ucma_ctl_table[] = { .data = &max_backlog, .maxlen = sizeof max_backlog, .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_INT_MAX, }, }; |