Skip to content

Commit

Permalink
RDS: TCP: Retransmit half-sent datagrams when switching sockets in rd…
Browse files Browse the repository at this point in the history
…s_tcp_reset_callbacks

When we switch a connection's sockets in rds_tcp_rest_callbacks,
any partially sent datagram must be retransmitted on the new
socket so that the receiver can correctly reassmble the RDS
datagram. Use rds_send_reset() which is designed for this purpose.

Signed-off-by: Sowmini Varadhan <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
sowminiv authored and davem330 committed Jun 7, 2016

Verified

This commit was signed with the committer’s verified signature.
EtiennePelletier Étienne Pelletier
1 parent 335b48d commit 0b6f760
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/rds/send.c
Original file line number Diff line number Diff line change
@@ -99,6 +99,7 @@ void rds_send_reset(struct rds_connection *conn)
list_splice_init(&conn->c_retrans, &conn->c_send_queue);
spin_unlock_irqrestore(&conn->c_lock, flags);
}
EXPORT_SYMBOL_GPL(rds_send_reset);

static int acquire_in_xmit(struct rds_connection *conn)
{
1 change: 1 addition & 0 deletions net/rds/tcp.c
Original file line number Diff line number Diff line change
@@ -173,6 +173,7 @@ void rds_tcp_reset_callbacks(struct socket *sock,
release_sock(osock->sk);
sock_release(osock);
newsock:
rds_send_reset(conn);
lock_sock(sock->sk);
write_lock_bh(&sock->sk->sk_callback_lock);
tc->t_sock = sock;

0 comments on commit 0b6f760

Please sign in to comment.