]> git.karo-electronics.de Git - karo-tx-linux.git/commit
RDS: fix rds-ping spinlock recursion
authorjeff.liu <jeff.liu@oracle.com>
Mon, 8 Oct 2012 18:57:27 +0000 (18:57 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:26:34 +0000 (23:26 +0000)
commit0cf1f12a037169d284625ca3bc4687cc2b826499
treedc9540364c31ad9d8051ecd894524d30c91c14a3
parent16e23aa20ef67e5a97347aecbeae843e72149a68
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: Ben Hutchings <ben@decadent.org.uk>
net/rds/send.c