RDMA/core: Fixes infiniband sysctl bounds
authorNicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr>
Mon, 24 Feb 2025 09:58:20 +0000 (10:58 +0100)
committerLeon Romanovsky <leon@kernel.org>
Mon, 3 Mar 2025 18:49:02 +0000 (13:49 -0500)
commitf33cd9b3fd03a791296ab37550ffd26213a90c4e
tree764e57110c78afb48a0d57383e8a7d828b71dbd5
parenta1ecb30f90856b0be4168ad51b8875148e285c1f
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>
drivers/infiniband/core/iwcm.c
drivers/infiniband/core/ucma.c