RDMA/core: Verify that memory window type is legal
authorNoa Osherovich <noaos@mellanox.com>
Tue, 19 Feb 2019 13:07:34 +0000 (15:07 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 20 Feb 2019 03:52:19 +0000 (20:52 -0700)
commitd0e02bf6cd6da339a31f7ef6a10aba9ad362a4d9
tree3c4859d02e7b0231bff41e9b619d0157f44c7c80
parent1882ab867863531ab9caab81fd6ac5fee6d1a314
RDMA/core: Verify that memory window type is legal

Before calling the provider's alloc_mw function, verify that the
given memory type is either IB_MW_TYPE_1 or IB_MW_TYPE_2.

Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_cmd.c