OSDN Git Service

IB/mlx5: Block DEVX umem from the non applicable cases
authorYishai Hadas <yishaih@mellanox.com>
Wed, 5 Dec 2018 13:50:21 +0000 (15:50 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 6 Dec 2018 16:38:14 +0000 (11:38 -0500)
commit47f07f03b5ee436fe074c4fb1fb28d013c36a0d8
treea8c04f0877593be520d4b62db7282e680f652efe
parent37b06e5078975bb4efe3cbd91e254112851b125f
IB/mlx5: Block DEVX umem from the non applicable cases

Blocks creating a DEVX UMEM with the non applicable access flags
as of ODP, MW_BIND, etc.

Specifically when an ODP flag is used below WARN call trace is issued.

[ 2510.404131] RIP: 0010:__mlx5_ib_populate_pas+0x207/0x220 [mlx5_ib]
...
[ 2510.404143] Call Trace:
[ 2510.404150]  ? __kmalloc_node+0x1b3/0x280
[ 2510.404156]  ? _uverbs_alloc+0x63/0x90 [ib_uverbs]
[ 2510.404158]  ? _uverbs_alloc+0x63/0x90 [ib_uverbs]
[ 2510.404162]  mlx5_ib_populate_pas+0x53/0x60 [mlx5_ib]
[ 2510.404167]  mlx5_ib_handler_MLX5_IB_METHOD_DEVX_UMEM_REG+0x273/0x3f0 [mlx5_ib]

Fixes: aeae94579caf ("IB/mlx5: Add DEVX support for memory registration")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/devx.c