linux_dsm_epyc7002/drivers/infiniband/ulp
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
..
ipoib IB/cm: Replace members of sa_path_rec with 'struct sgid_attr *' 2018-06-25 14:19:57 -06:00
iser treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
isert IB/core: add max_send_sge and max_recv_sge attributes 2018-06-18 13:17:28 -06:00
opa_vnic opa_vnic: Just use skb_get_hash instead of skb_tx_hash 2018-04-29 22:01:32 -04:00
srp IB: Replace ib_query_gid/ib_get_cached_gid with rdma_query_gid 2018-06-18 11:09:05 -06:00
srpt IB/core: add max_send_sge and max_recv_sge attributes 2018-06-18 13:17:28 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00