summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjeff.liu <jeff.liu@oracle.com>2012-10-08 18:57:27 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-28 10:14:15 -0700
commit04c592343f478826bf1e5d0d178bb295d848c428 (patch)
treee4c1c553b9e0801cbe6e7773f6af18b1a88d7166 /net
parent2d2f242f248f19c4618bde9091d20416e2c9a1f6 (diff)
downloadlinux-3.10-04c592343f478826bf1e5d0d178bb295d848c428.tar.gz
linux-3.10-04c592343f478826bf1e5d0d178bb295d848c428.tar.bz2
linux-3.10-04c592343f478826bf1e5d0d178bb295d848c428.zip
RDS: fix rds-ping spinlock recursion
[ Upstream commit 5175a5e76bbdf20a614fb47ce7a38f0f39e70226 ] This is the revised patch for fixing rds-ping spinlock recursion according to Venkat's suggestions. RDS ping/pong over TCP feature has been broken for years(2.6.39 to 3.6.0) since we have to set TCP cork and call kernel_sendmsg() between ping/pong which both need to lock "struct sock *sk". However, this lock has already been hold before rds_tcp_data_ready() callback is triggerred. As a result, we always facing spinlock resursion which would resulting in system panic. Given that RDS ping is only used to test the connectivity and not for serious performance measurements, we can queue the pong transmit to rds_wq as a delayed response. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> CC: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com> CC: David S. Miller <davem@davemloft.net> CC: James Morris <james.l.morris@oracle.com> Signed-off-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/rds/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/send.c b/net/rds/send.c
index 96531d4033a..88eace57dd6 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1122,7 +1122,7 @@ rds_send_pong(struct rds_connection *conn, __be16 dport)
rds_stats_inc(s_send_pong);
if (!test_bit(RDS_LL_SEND_FULL, &conn->c_flags))
- rds_send_xmit(conn);
+ queue_delayed_work(rds_wq, &conn->c_send_w, 0);
rds_message_put(rm);
return 0;