aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/send.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-29 19:50:54 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:12:18 -0400
commitcf4b7389ee812817deeb11da1422004e01b50646 (patch)
tree318d1e1da095880a19fc41992a3b57e9190e3b23 /net/rds/send.c
parentf2ec76f288118fb18449402d75383212cbcb6762 (diff)
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 <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r--net/rds/send.c5
1 files changed, 3 insertions, 2 deletions
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)
468 struct rds_sock *rs = NULL; 468 struct rds_sock *rs = NULL;
469 struct rm_atomic_op *ao; 469 struct rm_atomic_op *ao;
470 struct rds_notifier *notifier; 470 struct rds_notifier *notifier;
471 unsigned long flags;
471 472
472 spin_lock(&rm->m_rs_lock); 473 spin_lock_irqsave(&rm->m_rs_lock, flags);
473 474
474 ao = &rm->atomic; 475 ao = &rm->atomic;
475 if (test_bit(RDS_MSG_ON_SOCK, &rm->m_flags) 476 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)
486 ao->op_notifier = NULL; 487 ao->op_notifier = NULL;
487 } 488 }
488 489
489 spin_unlock(&rm->m_rs_lock); 490 spin_unlock_irqrestore(&rm->m_rs_lock, flags);
490 491
491 if (rs) { 492 if (rs) {
492 rds_wake_sk_sleep(rs); 493 rds_wake_sk_sleep(rs);