linux/net/rds
Sowmini Varadhan 3db6e0d172 rds: use RCU to synchronize work-enqueue with connection teardown
rds_sendmsg() can enqueue work on cp_send_w from process context, but
it should not enqueue this work if connection teardown  has commenced
(else we risk enquing work after rds_conn_path_destroy() has assumed that
all work has been cancelled/flushed).

Similarly some other functions like rds_cong_queue_updates
and rds_tcp_data_ready are called in softirq context, and may end
up enqueuing work on rds_wq after rds_conn_path_destroy() has assumed
that all workqs are quiesced.

Check the RDS_DESTROY_PENDING bit and use rcu synchronization to avoid
all these races.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-05 13:39:18 -05:00
..
af_rds.c
bind.c rds; Reset rs->rs_bound_addr in rds_add_bound() failure path 2017-12-27 13:37:27 -05:00
cong.c rds: use RCU to synchronize work-enqueue with connection teardown 2018-01-05 13:39:18 -05:00
connection.c rds: use RCU to synchronize work-enqueue with connection teardown 2018-01-05 13:39:18 -05:00
ib.c RDS: IB: Limit the scope of has_fr/has_fmr variables 2017-10-05 21:16:33 -07:00
ib.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
ib_cm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-03-15 11:59:10 -07:00
ib_fmr.c net/rds/ib_fmr.c: use kmalloc_array_node() 2017-11-15 18:21:02 -08:00
ib_frmr.c
ib_mr.h rds: ib: add the static type to the function 2017-03-13 23:20:05 -07:00
ib_rdma.c RDS: IB: Initialize max_items based on underlying device attributes 2017-10-05 21:16:33 -07:00
ib_recv.c rds: ib: Fix NULL pointer dereference in debug code 2017-11-10 14:54:47 +09:00
ib_ring.c
ib_send.c rds: Fix inaccurate accounting of unsignaled wrs 2017-10-26 17:35:57 +09:00
ib_stats.c
ib_sysctl.c
info.c
info.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig
loop.c
loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
message.c net, rds: convert rds_message.m_refcount from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
page.c
rdma.c rds: Fix NULL pointer dereference in __rds_rdma_map 2017-12-06 15:44:27 -05:00
rdma_transport.c
rdma_transport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rds.h rds: Use atomic flag to track connections being destroyed 2018-01-05 13:39:18 -05:00
rds_single_path.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
recv.c net, rds: convert rds_incoming.i_refcount from atomic_t to refcount_t 2017-07-04 22:35:17 +01:00
send.c rds: use RCU to synchronize work-enqueue with connection teardown 2018-01-05 13:39:18 -05:00
stats.c
sysctl.c
tcp.c rds: tcp: cleanup if kmem_cache_alloc fails in rds_tcp_conn_alloc() 2017-12-27 13:37:27 -05:00
tcp.h rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete 2017-12-01 15:25:15 -05:00
tcp_connect.c rds: Use atomic flag to track connections being destroyed 2018-01-05 13:39:18 -05:00
tcp_listen.c rds: tcp: use sock_create_lite() to create the accept socket 2017-07-08 11:16:16 +01:00
tcp_recv.c rds: use RCU to synchronize work-enqueue with connection teardown 2018-01-05 13:39:18 -05:00
tcp_send.c rds: use RCU to synchronize work-enqueue with connection teardown 2018-01-05 13:39:18 -05:00
tcp_stats.c
threads.c rds: use RCU to synchronize work-enqueue with connection teardown 2018-01-05 13:39:18 -05:00
transport.c rds: remove unnecessary returned value check 2017-03-03 09:51:22 -08:00