1
0
Fork 0
remarkable-linux/net/rds
Sowmini Varadhan 4dc0159458 rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete
commit f10b4cff98 upstream.

The rds_tcp_kill_sock() function parses the rds_tcp_conn_list
to find the rds_connection entries marked for deletion as part
of the netns deletion under the protection of the rds_tcp_conn_lock.
Since the rds_tcp_conn_list tracks rds_tcp_connections (which
have a 1:1 mapping with rds_conn_path), multiple tc entries in
the rds_tcp_conn_list will map to a single rds_connection, and will
be deleted as part of the rds_conn_destroy() operation that is
done outside the rds_tcp_conn_lock.

The rds_tcp_conn_list traversal done under the protection of
rds_tcp_conn_lock should not leave any doomed tc entries in
the list after the rds_tcp_conn_lock is released, else another
concurrently executiong netns delete (for a differnt netns) thread
may trip on these entries.

Reported-by: syzbot <syzkaller@googlegroups.com>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:43 +01:00
..
Kconfig RDS: Drop stale iWARP RDMA transport 2016-03-02 14:13:17 -05:00
Makefile rds: debug messages are enabled by default 2016-10-29 15:55:57 -04:00
af_rds.c RDS: Add support for SO_TIMESTAMP for incoming messages 2016-03-02 14:13:17 -05:00
bind.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
cong.c RDS: split out connection specific state from rds_connection to rds_conn_path 2016-06-14 23:50:41 -07:00
connection.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
ib.c IB/core: add support to create a unsafe global rkey to ib_create_pd 2016-09-23 13:47:44 -04:00
ib.h RDS: add __printf format attribute to error reporting functions 2016-08-08 16:16:21 -07:00
ib_cm.c rds: ib: add error handle 2017-10-08 10:26:10 +02:00
ib_fmr.c RDS: IB: move FMR code to its own file 2016-03-02 14:13:18 -05:00
ib_frmr.c RDS: RDMA: fix the ib_map_mr_sg_zbva() argument 2017-11-30 08:39:10 +00:00
ib_mr.h RDS: IB: Support Fastreg MR (FRMR) memory registration mode 2016-03-02 14:13:19 -05:00
ib_rdma.c RDS: split out connection specific state from rds_connection to rds_conn_path 2016-06-14 23:50:41 -07:00
ib_recv.c RDS: TCP: make receive path use the rds_conn_path 2016-07-01 16:45:17 -04:00
ib_ring.c RDS/IW+IB: Set recv ring low water mark to 1/2 full. 2009-04-09 17:21:14 -07:00
ib_send.c RDS: RDMA: Fix the composite message user notification 2017-10-08 10:26:02 +02:00
ib_stats.c RDS: IB: add mr reused stats 2016-03-02 14:13:19 -05:00
ib_sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
info.c rds: fix an integer overflow test in rds_info_getsockopt() 2015-08-03 15:20:16 -07:00
info.h RDS: Info and stats 2009-02-26 23:39:25 -08:00
loop.c RDS: TCP: Hooks to set up a single connection path 2016-07-01 16:45:17 -04:00
loop.h RDS: loopback 2009-02-26 23:39:26 -08:00
message.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
page.c RDS: memory allocated must be align to 8 2016-04-07 16:58:27 -04:00
rdma.c RDS: null pointer dereference in rds_atomic_free_op 2018-01-17 09:38:53 +01:00
rdma_transport.c RDS: split out connection specific state from rds_connection to rds_conn_path 2016-06-14 23:50:41 -07:00
rdma_transport.h RDS: Drop stale iWARP RDMA transport 2016-03-02 14:13:17 -05:00
rds.h RDS: make message size limit compliant with spec 2017-11-30 08:39:10 +00:00
rds_single_path.h RDS: split out connection specific state from rds_connection to rds_conn_path 2016-06-14 23:50:41 -07:00
recv.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
send.c RDS: Check cmsg_len before dereferencing CMSG_DATA 2018-01-02 20:35:11 +01:00
stats.c net/rds: zero last byte for strncpy 2013-03-08 00:35:44 -05:00
sysctl.c net: rds: fix coding style issues 2016-06-18 21:34:09 -07:00
tcp.c rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete 2018-02-25 11:05:43 +01:00
tcp.h rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete 2018-02-25 11:05:43 +01:00
tcp_connect.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
tcp_listen.c rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races 2017-12-14 09:28:20 +01:00
tcp_recv.c RDS: TCP: make receive path use the rds_conn_path 2016-07-01 16:45:17 -04:00
tcp_send.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
tcp_stats.c net: rds: fix const array syntax 2011-07-01 16:16:19 -07:00
threads.c RDS: TCP: Enable multipath RDS for TCP 2016-07-15 11:36:58 -07:00
transport.c net: rds: fix coding style issues 2016-06-18 21:34:09 -07:00