]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix reqlen validation in mlx5_ib_alloc_ucontext
authorMajd Dibbiny <majd@mellanox.com>
Thu, 28 Jan 2016 15:51:47 +0000 (17:51 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Feb 2016 21:42:22 +0000 (16:42 -0500)
commit76effa01cfec9f614bedf060d9b36b61548427f7
tree2042325862ce637003e7bce43ee6af201e5ad02e
parentf4fa66702fecd4e4ed876cda46fd9969f716ded3
IB/mlx5: Fix reqlen validation in mlx5_ib_alloc_ucontext

Older libraries that don't have all the new req_v2 fields
should be able to work as well. Today, if the library uses v2, it
will fail to allocate context since the size of reqlen is smaller
than the req_v2 size.

Fix the validation to be with the original req_v2 size and not
the current.

Fixes: 68808e236718 ('IB/mlx5: Expose CQE version to user-space')
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c