diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2016-06-04 13:59:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-07 15:10:15 -0700 |
commit | 335b48d980f631fbc5b233cbb3625ac0c86d67cb (patch) | |
tree | c09223b2cdbe5b6a9d876ad07a9ee29cebcb8588 /net/rds/send.c | |
parent | 80e509db54c81247b32fcb75bb1730fc789b893d (diff) |
RDS: TCP: Add/use rds_tcp_reset_callbacks to reset tcp socket safely
When rds_tcp_accept_one() has to replace the existing tcp socket
with a newer tcp socket (duelling-syn resolution), it must lock_sock()
to suppress the rds_tcp_data_recv() path while callbacks are being
changed. Also, existing RDS datagram reassembly state must be reset,
so that the next datagram on the new socket does not have corrupted
state. Similarly when resetting the newly accepted socket, appropriate
locks and synchronization is needed.
This commit ensures correct synchronization by invoking
kernel_sock_shutdown to reset a newly accepted sock, and by taking
appropriate lock_sock()s (for old and new sockets) when resetting
existing callbacks.
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>
Diffstat (limited to 'net/rds/send.c')
0 files changed, 0 insertions, 0 deletions