From: Andy Grover Date: Mon, 29 Mar 2010 23:50:54 +0000 (-0700) Subject: RDS: Fix locking in send on m_rs_lock X-Git-Tag: MMI-PSA29.97-13-9~21994^2~499^2~59 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf4b7389ee812817deeb11da1422004e01b50646;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git RDS: Fix locking in send on m_rs_lock Do not nest m_rs_lock under c_lock Disable interrupts in {rdma,atomic}_send_complete Signed-off-by: Andy Grover --- diff --git a/net/rds/send.c b/net/rds/send.c index 15b715a85fd5..ecda3e6c432c 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -468,8 +468,9 @@ void rds_atomic_send_complete(struct rds_message *rm, int status) struct rds_sock *rs = NULL; struct rm_atomic_op *ao; struct rds_notifier *notifier; + unsigned long flags; - spin_lock(&rm->m_rs_lock); + spin_lock_irqsave(&rm->m_rs_lock, flags); ao = &rm->atomic; if (test_bit(RDS_MSG_ON_SOCK, &rm->m_flags) @@ -486,7 +487,7 @@ void rds_atomic_send_complete(struct rds_message *rm, int status) ao->op_notifier = NULL; } - spin_unlock(&rm->m_rs_lock); + spin_unlock_irqrestore(&rm->m_rs_lock, flags); if (rs) { rds_wake_sk_sleep(rs);