• jeff.liu's avatar
    RDS: fix rds-ping spinlock recursion · 5175a5e7
    jeff.liu authored
    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: default avatarDan 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: default avatarJie Liu <jeff.liu@oracle.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5175a5e7
send.c 30 KB