diff options
| author | 2021-10-21 08:27:39 +0300 | |
|---|---|---|
| committer | 2021-10-21 08:27:39 +0300 | |
| commit | 60dd57c7479418e2bc902143eb46a2fdcfeecbbb (patch) | |
| tree | ab6005faf6076a4c93fdfbcdccc1ff4bc044c8ec /net/sched/sch_api.c | |
| parent | net/mlx5: Add priorities for counters in RDMA namespaces (diff) | |
| parent | RDMA/mlx5: Attach ndescs to mlx5_ib_mkey (diff) | |
| download | linux-dev-60dd57c7479418e2bc902143eb46a2fdcfeecbbb.tar.xz linux-dev-60dd57c7479418e2bc902143eb46a2fdcfeecbbb.zip | |
Merge brank 'mlx5_mkey' into rdma.git for-next
A small series to clean up the mlx5 mkey code across the mlx5_core and
InfiniBand.
* branch 'mlx5_mkey':
RDMA/mlx5: Attach ndescs to mlx5_ib_mkey
RDMA/mlx5: Move struct mlx5_core_mkey to mlx5_ib
RDMA/mlx5: Replace struct mlx5_core_mkey by u32 key
RDMA/mlx5: Remove pd from struct mlx5_core_mkey
RDMA/mlx5: Remove size from struct mlx5_core_mkey
RDMA/mlx5: Remove iova from struct mlx5_core_mkey
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'net/sched/sch_api.c')
| -rw-r--r-- | net/sched/sch_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 5e90e9b160e3..12f39a2dffd4 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -513,6 +513,12 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt, return stab; } + if (s->size_log > STAB_SIZE_LOG_MAX || + s->cell_log > STAB_SIZE_LOG_MAX) { + NL_SET_ERR_MSG(extack, "Invalid logarithmic size of size table"); + return ERR_PTR(-EINVAL); + } + stab = kmalloc(sizeof(*stab) + tsize * sizeof(u16), GFP_KERNEL); if (!stab) return ERR_PTR(-ENOMEM); |
