freebsd-skq/sys/ofed
Hans Petter Selasky 7477a89ae2 Ensure that CM_ID exists prior to access it in ibcore.
Prior to access UCMA commands, the context should be initialized
and connected to CM_ID with ucma_create_id(). In case user skips
this step, he can provide non-valid ctx without CM_ID and cause
to multiple NULL dereferences.

Also there are situations where the create_id can be raced with
other user access, ensure that the context is only shared to
other threads once it is fully initialized to avoid the races.

Linux commit:
e8980d67d6017c8eee8f9c35f782c4bd68e004c9

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2018-07-17 09:13:11 +00:00
..
drivers/infiniband Ensure that CM_ID exists prior to access it in ibcore. 2018-07-17 09:13:11 +00:00
include Add support for prio-tagged traffic for RDMA in ibcore. 2018-07-17 09:11:53 +00:00