linux-stable/include/rdma
Parav Pandit 398391071f IB/cm: Replace members of sa_path_rec with 'struct sgid_attr *'
While processing a path record entry in CM messages the associated GID
attribute is now also supplied.

Currently for RoCE a netdevice's net namespace pointer and ifindex are
stored in path record entry. Both of these fields of the netdev can change
anytime while processing CM messages. Additionally storing net namespace
without holding reference will lead to use-after-free crash. Therefore it
is removed. Netdevice information for RoCE is instead provided via
referenced gid attribute in ib_cm requests.

Such a design leads to a situation where the kernel can crash when the net
pointer becomes invalid. However today it is always initialized to
init_net, which cannot become invalid. In order to support processing
packets in any arbitrary namespace of the received packet, it is necessary
to avoid such conditions.

This patch removes the dependency on the net pointer and ifindex; instead
it will rely on SGID attribute which contains a pointer to netdev.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
2018-06-25 14:19:57 -06:00
..
ib.h new helper: uaccess_kernel() 2017-03-28 16:43:25 -04:00
ib_addr.h IB/cm: Keep track of the sgid_attr that created the cm id 2018-06-25 14:19:56 -06:00
ib_cache.h IB/core: Provide rdma_ versions of the gid cache API 2018-06-18 11:09:05 -06:00
ib_cm.h IB/cm: Pass the sgid_attr through various events 2018-06-25 14:19:57 -06:00
ib_fmr_pool.h
ib_hdrs.h IB/hfi1: Remove unnecessary fecn and becn fields 2018-02-01 15:43:29 -07:00
ib_mad.h IB/core: Enforce security on management datagrams 2017-05-23 12:27:21 -04:00
ib_marshall.h IB/core: Convert ah_attr from OPA to IB when copying to user 2017-08-08 14:47:18 -04:00
ib_pack.h IB/core: Fix calculation of maximum RoCE MTU 2017-10-18 12:11:36 -04:00
ib_pma.h IB/core: Display extended counter set if available 2015-12-23 15:58:30 -05:00
ib_sa.h IB/cm: Replace members of sa_path_rec with 'struct sgid_attr *' 2018-06-25 14:19:57 -06:00
ib_smi.h IB/core: Move SM class defines from ib_mad.h to ib_smi.h 2015-09-03 15:50:32 -04:00
ib_umem.h IB/umem: Use the correct mm during ib_umem_release 2018-05-15 17:09:10 -06:00
ib_umem_odp.h RDMA/umem: Avoid partial declaration of non-static function 2017-11-10 13:02:12 -05:00
ib_verbs.h IB: Make ib_init_ah_attr_from_wc set sgid_attr 2018-06-25 14:19:56 -06:00
iw_cm.h rdma_cm: add rdma_reject_msg() helper function 2016-12-14 11:38:28 -05:00
iw_portmap.h RDMA/core: Enable the iWarp Port Mapper to provide the actual address of the connecting peer to its clients 2015-05-05 09:18:01 -04:00
mr_pool.h IB/core: add a simple MR pool 2016-05-13 13:37:18 -04:00
opa_addr.h IB/SA: Check dlid before SA agent queries for ClassPortInfo 2017-12-22 13:33:30 -07:00
opa_port_info.h IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
opa_smi.h IB/mad: Eliminate redundant SM class version defines for OPA 2016-12-14 11:01:58 -05:00
opa_vnic.h IB/hfi1: Add support to receive 16B bypass packets 2017-08-22 14:22:37 -04:00
rdma_cm.h RDMA/CMA: add rdma_iw_cm_id() and rdma_res_to_id() helpers 2018-05-22 14:32:30 -04:00
rdma_cm_ib.h RDMA/{cma, ucma}: Simplify and rename rdma_set_ib_paths 2018-01-10 22:00:33 -07:00
rdma_netlink.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rdma_vt.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
rdmavt_cq.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
rdmavt_mr.h IB/rdmavt: Handle dereg of inuse MRs properly 2017-08-28 19:12:31 -04:00
rdmavt_qp.h IB/rdmavt, IB/hfi1: Create device dependent s_flags 2018-06-19 11:49:46 -06:00
restrack.h RDMA/restrack: Change SPDX tag to properly reflect license 2018-06-05 14:04:20 -06:00
rw.h rdma core: Add rdma_rw_mr_payload() 2017-09-05 15:15:30 -04:00
uverbs_ioctl.h IB/uverbs: Delete type and id from uverbs_obj_attr 2018-06-22 09:02:59 -06:00
uverbs_named_ioctl.h IB/core: Introduce DECLARE_UVERBS_GLOBAL_METHODS 2018-06-19 10:53:02 -06:00
uverbs_std_types.h IB/core: Introduce DECLARE_UVERBS_GLOBAL_METHODS 2018-06-19 10:53:02 -06:00
uverbs_types.h IB/core: Explicitly destroy an object while keeping uobject 2017-08-31 08:35:11 -04:00