Sean Hefty [Tue, 28 Apr 2015 21:31:15 +0000 (14:31 -0700)]
Remove prints to stderr
The library should just fail operations with ENODEV, rather than
printing to stderr. Printing can result in applications failing,
or displaying incorrect error messages when no verb devices are
actually present.
Sean Hefty [Tue, 28 Apr 2015 21:31:15 +0000 (14:31 -0700)]
Remove prints to stderr
The library should just fail operations with ENODEV, rather than
printing to stderr. Printing can result in applications failing,
or displaying incorrect error messages when no verb devices are
actually present.
Ilya Nelkenbaum [Thu, 26 Mar 2015 19:41:11 +0000 (12:41 -0700)]
cma: Workaround for rdma_ucm kernel bug
For certain new kernels, IB_QP_SMAC bit is erroneously
set in QP attribute mask. This workaround turns
off that bit. It allows SSA connections (AF_IB)
to work. Without this workaround, there are issues
on the client side.
Kernel patch which caused issue is commit dd5f03b
IB/core: Ethernet L2 attributes in verbs/cm structures
IB/core: When marshaling ucma path from user-space, clear unused fields
When marshaling a user path to the kernel struct ib_sa_path, we need
to zero smac and dmac and set the vlan id to the "no vlan" value.
This is to ensure that Ethernet attributes are not used with
InfiniBand QPs.
Fixes: dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm structures") Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
The fix was pushed to stable 3.14, 3.18 and 3.19 versions.
Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com> Signed-off-by: Hal Rosenstock <hal@mellanox.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Sean Hefty [Wed, 11 Feb 2015 00:50:08 +0000 (16:50 -0800)]
rsocket: Fix race in indexer map
Although insertions and removals of rsockets are protected
against accesses to the index map, when reading the map using
a non-rsocket (i.e. normal fd), the reading of the map may
overlap with the removal of an rsocket. This can result in
accessing freed memory.
We can avoid this by not freeing the memory when rsockets
no longer reference an index array. This ensures that the
memory is valid, and protects against reading the memory without
adding locking into the read path.
Problem reported by: Sasha Kotchubievsky <sashakot@mellanox.com>
Sean Hefty [Wed, 11 Feb 2015 00:50:08 +0000 (16:50 -0800)]
rsocket: Fix race in indexer map
Although insertions and removals of rsockets are protected
against accesses to the index map, when reading the map using
a non-rsocket (i.e. normal fd), the reading of the map may
overlap with the removal of an rsocket. This can result in
accessing freed memory.
We can avoid this by not freeing the memory when rsockets
no longer reference an index array. This ensures that the
memory is valid, and protects against reading the memory without
adding locking into the read path.
Problem reported by: Sasha Kotchubievsky <sashakot@mellanox.com>
Sean Hefty [Wed, 11 Feb 2015 00:50:08 +0000 (16:50 -0800)]
rsocket: Fix race in indexer map
Although insertions and removals of rsockets are protected
against accesses to the index map, when reading the map using
a non-rsocket (i.e. normal fd), the reading of the map may
overlap with the removal of an rsocket. This can result in
accessing freed memory.
Problem reported by: Sasha Kotchubievsky <sashakot@mellanox.com>
Sean Hefty [Wed, 11 Feb 2015 00:50:08 +0000 (16:50 -0800)]
rsocket: Fix race in indexer map
Although insertions and removals of rsockets are protected
against accesses to the index map, when reading the map using
a non-rsocket (i.e. normal fd), the reading of the map may
overlap with the removal of an rsocket. This can result in
accessing freed memory.