]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA: Check net namespace access for uverbs, umad, cma and nldev
authorParav Pandit <parav@mellanox.com>
Tue, 26 Feb 2019 12:01:46 +0000 (14:01 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 28 Mar 2019 17:52:02 +0000 (14:52 -0300)
commitab09014c1a3e545317309f4b3ae1a8bdb26a45c3
tree5a82ffb0e06801b4e617cd2646f81cf14b1212c4
parentbe21f1a08fb860ebfdaf6d947a4c84a450977511
RDMA: Check net namespace access for uverbs, umad, cma and nldev

Introduce an API rdma_dev_access_netns() to check whether a rdma device
can be accessed from the specified net namespace or not.
Use rdma_dev_access_netns() while opening character uverbs, umad network
device and also check while rdma cm_id binds to rdma device.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cma.c
drivers/infiniband/core/device.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs_main.c
include/rdma/ib_verbs.h