]> 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)
commit0deab9edd391d9eae4c1743ea90351fc87de0db7
tree2042325862ce637003e7bce43ee6af201e5ad02e
parentc8e2665b5e68cc15e1c869b3551b9dfa900bbd18
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: 708ef830e7c9 ('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