Commit f33cd9b3 authored by Nicolas Bouchinet's avatar Nicolas Bouchinet Committed by Leon Romanovsky
Browse files

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: default avatarNicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr>
Link: https://patch.msgid.link/20250224095826.16458-6-nicolas.bouchinet@clip-os.org


Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: default avatarJoel Granados <joel.granados@kernel.org>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent a1ecb30f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -109,7 +109,9 @@ static struct ctl_table iwcm_ctl_table[] = {
		.data		= &default_backlog,
		.maxlen		= sizeof(default_backlog),
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= SYSCTL_ZERO,
		.extra2		= SYSCTL_INT_MAX,
	},
};

+3 −1
Original line number Diff line number Diff line
@@ -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,
	},
};