alistair23-linux/net/rds
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
..
af_rds.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-06-24 16:49:49 -07:00
bind.c net/rds: Add setsockopt support for SO_RDS_TRANSPORT 2015-05-31 21:47:23 -07:00
cong.c
connection.c
ib.c IB/core: lock client data with lists_rwsem 2015-08-30 15:48:21 -04:00
ib.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-06-24 16:49:49 -07:00
ib_cm.c IB/core: Change ib_create_cq to use struct ib_cq_init_attr 2015-06-12 14:49:10 -04:00
ib_rdma.c rds: rds_ib_device.refcount overflow 2015-07-14 13:20:11 -04:00
ib_recv.c RDS: Switch to generic logging helpers 2015-05-18 13:44:23 -04:00
ib_ring.c
ib_send.c Merge branch 'for-4.2-misc' into k.o/for-4.2 2015-06-02 09:33:22 -04:00
ib_stats.c
ib_sysctl.c
info.c rds: fix an integer overflow test in rds_info_getsockopt() 2015-08-03 15:20:16 -07:00
info.h
iw.c IB/core: lock client data with lists_rwsem 2015-08-30 15:48:21 -04:00
iw.h
iw_cm.c IB/core: Change ib_create_cq to use struct ib_cq_init_attr 2015-06-12 14:49:10 -04:00
iw_rdma.c
iw_recv.c
iw_ring.c
iw_send.c rds: re-entry of rds_ib_xmit/rds_iw_xmit 2015-06-02 09:22:31 -04:00
iw_stats.c
iw_sysctl.c
Kconfig
loop.c
loop.h
Makefile
message.c
page.c
rdma.c
rdma_transport.c RDS: Switch to generic logging helpers 2015-05-18 13:44:23 -04:00
rdma_transport.h
rds.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-06-24 16:49:49 -07:00
recv.c
send.c
stats.c
sysctl.c
tcp.c
tcp.h
tcp_connect.c
tcp_listen.c
tcp_recv.c
tcp_send.c
tcp_stats.c
threads.c
transport.c net-RDS: Delete an unnecessary check before the function call "module_put" 2015-07-03 09:27:42 -07:00