mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 05:18:45 +02:00
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>
This commit is contained in:
parent
a1ecb30f90
commit
f33cd9b3fd
|
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user