]> git.kernelconcepts.de Git - karo-tx-linux.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)
commita168a41c8147fe644f1144031a6ec27a1a13fe37
tree2042325862ce637003e7bce43ee6af201e5ad02e
parentd4584ddfc97518a575ed538307e81e73456b8175
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: f72300c56c3b ('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