]> git.dujemihanovic.xyz Git - linux.git/commit
RDMA/mlx5: Add check for srq max_sge attribute
authorPatrisious Haddad <phaddad@nvidia.com>
Tue, 28 May 2024 12:52:56 +0000 (15:52 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 21 Jun 2024 13:19:36 +0000 (10:19 -0300)
commit36ab7ada64caf08f10ee5a114d39964d1f91e81d
tree251a94110fd70fad656fbbd8109bcf85ca36f8d7
parent81497c148b7a2e4a4fbda93aee585439f7323e2e
RDMA/mlx5: Add check for srq max_sge attribute

max_sge attribute is passed by the user, and is inserted and used
unchecked, so verify that the value doesn't exceed maximum allowed value
before using it.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Link: https://lore.kernel.org/r/277ccc29e8d57bfd53ddeb2ac633f2760cf8cdd0.1716900410.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/srq.c