alistair23-linux/include/rdma
Haggai Eran 7c1eb45a22 IB/core: lock client data with lists_rwsem
An ib_client callback that is called with the lists_rwsem locked only for
read is protected from changes to the IB client lists, but not from
ib_unregister_device() freeing its client data. This is because
ib_unregister_device() will remove the device from the device list with
lists_rwsem locked for write, but perform the rest of the cleanup,
including the call to remove() without that lock.

Mark client data that is undergoing de-registration with a new going_down
flag in the client data context. Lock the client data list with lists_rwsem
for write in addition to using the spinlock, so that functions calling the
callback would be able to lock only lists_rwsem for read and let callbacks
sleep.

Since ib_unregister_client() now marks the client data context, no need for
remove() to search the context again, so pass the client data directly to
remove() callbacks.

Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-08-30 15:48:21 -04:00
..
ib.h
ib_addr.h IB/core cleanup: Add const to args - agent_send_response 2015-06-02 09:33:13 -04:00
ib_cache.h IB/core cleanup: Add const to args - agent_send_response 2015-06-02 09:33:13 -04:00
ib_cm.h IB/core: Fix unaligned accesses 2015-05-05 13:21:27 -04:00
ib_fmr_pool.h
ib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
ib_marshall.h
ib_pack.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
ib_pma.h
ib_sa.h IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
ib_smi.h
ib_umem.h IB/core: Add support for on demand paging regions 2014-12-15 18:13:36 -08:00
ib_umem_odp.h IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
ib_verbs.h IB/core: lock client data with lists_rwsem 2015-08-30 15:48:21 -04:00
iw_cm.h RDMA/iw_cm: Export tos field to iwarp providers 2015-06-02 09:22:30 -04: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
opa_port_info.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
opa_smi.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
rdma_cm.h IB/core, cma: Nice log-friendly string helpers 2015-05-18 13:43:52 -04:00
rdma_cm_ib.h
rdma_netlink.h RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00