Skip to content

Commit 212a0cb

Browse files
committed
Revert "RDMA/mlx5: Fix integer overflow while resizing CQ"
The original commit of this patch has a munged log message that is missing several of the tags the original author intended to be on the patch. This was due to patchworks misinterpreting a cut-n-paste separator line as an end of message line and munging the mbox that was used to import the patch: https://patchwork.kernel.org/patch/10264089/ The original patch will be reapplied with a fixed commit message so the proper tags are applied. This reverts commit aa0de36. Signed-off-by: Doug Ledford <[email protected]>
1 parent a5880b8 commit 212a0cb

File tree

1 file changed

+1
-6
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-6
lines changed

drivers/infiniband/hw/mlx5/cq.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,12 +1178,7 @@ static int resize_user(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *cq,
11781178
if (ucmd.reserved0 || ucmd.reserved1)
11791179
return -EINVAL;
11801180

1181-
/* check multiplication overflow */
1182-
if (ucmd.cqe_size && SIZE_MAX / ucmd.cqe_size <= entries - 1)
1183-
return -EINVAL;
1184-
1185-
umem = ib_umem_get(context, ucmd.buf_addr,
1186-
(size_t)ucmd.cqe_size * entries,
1181+
umem = ib_umem_get(context, ucmd.buf_addr, entries * ucmd.cqe_size,
11871182
IB_ACCESS_LOCAL_WRITE, 1);
11881183
if (IS_ERR(umem)) {
11891184
err = PTR_ERR(umem);

0 commit comments

Comments
 (0)