Re: [PATCH v2 net-next] RDS: fix rds-ping deadlock over TCP transport

From: David Miller
Date: Mon Oct 19 2015 - 01:30:18 EST


From: Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>
Date: Fri, 16 Oct 2015 22:13:21 -0400

> Sowmini found hang with rds-ping while testing RDS over TCP. Its
> a corner case and doesn't happen always. The issue is not reproducible
> with IB transport. Its clear from below dump why we see it with RDS TCP.
...
> This happens because rds_send_xmit() chain wants to take
> sock_lock which is already taken by tcp_v4_rcv() on its
> way to rds_tcp_data_ready(). Commit db6526dcb51b ("RDS: use
> rds_send_xmit() state instead of RDS_LL_SEND_FULL") which
> was trying to opportunistically finish the send request
> in same thread context.
>
> But because of above recursive lock hang with RDS TCP,
> the send work from rds_send_pong() needs to deferred to
> worker to avoid lock up. Given RDS ping is more of connectivity
> test than performance critical path, its should be ok even
> for transport like IB.
>
> Reported-by: Sowmini Varadhan <sowmini.varadhan@xxxxxxxxxx>
> Acked-by: Sowmini Varadhan <sowmini.varadhan@xxxxxxxxxx>
> Signed-off-by: Santosh Shilimkar <ssantosh@xxxxxxxxxx>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>
> ---
> v2: Dropped the confusing SEND_LL_FULL check from v1

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/