alistair23-linux/net/rds
Sowmini Varadhan 1789b2c077 RDS: only use passive connections when addresses match
Passive connections were added for the case where one loopback IB
connection between identical addresses needs another connection to store
the second QP.  Unfortunately, they were also created in the case where
the addesses differ and we already have both QPs.

This lead to a message reordering bug.

- two different IB interfaces and addresses on a machine: A B
- traffic is sent from A to B
- connection from A-B is created, connect request sent
- listening accepts connect request, B-A is created
- traffic flows, next_rx is incremented
- unacked messages exist on the retrans list
- connection A-B is shut down, new connect request sent
- listen sees existing loopback B-A, creates new passive B-A
- retrans messages are sent and delivered because of 0 next_rx

The problem is that the second connection request saw the previously
existing parent connection.  Instead of using it, and using the existing
next_rx_seq state for the traffic between those IPs, it mistakenly
thought that it had to create a passive connection.

We fix this by only using passive connections in the special case where
laddr and faddr match.  In this case we'll only ever have one parent
sending connection requests and one passive connection created as the
listening path sees the existing parent connection which initiated the
request.

Original patch by Zach Brown

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-08 15:17:23 -04:00
..
af_rds.c treewide: fix synchronize_rcu() in comments 2014-08-28 15:01:24 +02:00
bind.c
cong.c rds: rds_cong_queue_updates needs to defer the congestion update transmission 2015-02-11 14:35:44 -08:00
connection.c RDS: only use passive connections when addresses match 2015-04-08 15:17:23 -04:00
ib.c
ib.h rds: switch ->inc_copy_to_user() to passing iov_iter 2014-11-24 05:16:43 -05:00
ib_cm.c
ib_rdma.c net: Replace get_cpu_var through this_cpu_ptr 2014-08-26 13:45:47 -04:00
ib_recv.c rds: switch ->inc_copy_to_user() to passing iov_iter 2014-11-24 05:16:43 -05:00
ib_ring.c
ib_send.c net: rds: Remove repeated function names from debug output 2015-02-07 22:41:56 -08:00
ib_stats.c
ib_sysctl.c
info.c
info.h
iw.c
iw.h rds: switch ->inc_copy_to_user() to passing iov_iter 2014-11-24 05:16:43 -05:00
iw_cm.c net: rds: Remove repeated function names from debug output 2015-02-07 22:41:56 -08:00
iw_rdma.c rds: avoid potential stack overflow 2015-03-12 00:28:01 -04:00
iw_recv.c rds: switch ->inc_copy_to_user() to passing iov_iter 2014-11-24 05:16:43 -05:00
iw_ring.c
iw_send.c net: rds: Remove repeated function names from debug output 2015-02-07 22:41:56 -08:00
iw_stats.c
iw_sysctl.c rds: remove the unneed NULL checking 2014-05-09 15:59:45 -04:00
Kconfig
loop.c
loop.h
Makefile
message.c rds: Make rds_message_copy_from_user() return 0 on success. 2015-02-07 22:41:56 -08:00
page.c
rdma.c rds: avoid calling sock_kfree_s() on allocation failure 2014-10-14 17:00:19 -04:00
rdma_transport.c RDS/RDMA: Replace comma with semicolon 2014-05-30 17:48:58 -07:00
rdma_transport.h
rds.h rds: switch rds_message_copy_from_user() to iov_iter 2014-11-24 05:16:43 -05:00
recv.c put iov_iter into msghdr 2014-12-09 16:29:03 -05:00
send.c net: introduce helper macro for_each_cmsghdr 2014-12-10 22:41:55 -05:00
stats.c
sysctl.c net: rds: use correct size for max unacked packets and bytes 2015-02-04 16:07:27 -08:00
tcp.c
tcp.h rds: switch ->inc_copy_to_user() to passing iov_iter 2014-11-24 05:16:43 -05:00
tcp_connect.c net/rds: do proper house keeping if connection fails in rds_tcp_conn_connect 2014-10-03 12:51:59 -07:00
tcp_listen.c rds/tcp_listen: Replace comma with semicolon 2014-05-30 17:48:58 -07:00
tcp_recv.c rds: switch ->inc_copy_to_user() to passing iov_iter 2014-11-24 05:16:43 -05:00
tcp_send.c arch: Mass conversion of smp_mb__*() 2014-04-18 14:20:48 +02:00
tcp_stats.c
threads.c net/rds: call rds_conn_drop instead of open code it at rds_connect_complete 2014-10-03 12:51:59 -07:00
transport.c