diff options
author | Zach Brown <zach.brown@oracle.com> | 2010-07-15 15:34:33 -0400 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:16:44 -0400 |
commit | ea819867b788728aca60717e4fdacb3df771f670 (patch) | |
tree | 68952e283e4b119622c6e8244d96e41c623ae4b0 /net/rds/ib.h | |
parent | 1bde04a63d532c2540d6fdee0a661530a62b1686 (diff) |
RDS/IB: protect the list of IB devices
The RDS IB device list wasn't protected by any locking. Traversal in
both the get_mr and FMR flushing paths could race with additon and
removal.
List manipulation is done with RCU primatives and is protected by the
write side of a rwsem. The list traversal in the get_mr fast path is
protected by a rcu read critical section. The FMR list traversal is
more problematic because it can block while traversing the list. We
protect this with the read side of the rwsem.
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Diffstat (limited to 'net/rds/ib.h')
-rw-r--r-- | net/rds/ib.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h index a13ced504145..2189fd47a738 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #define RDS_IB_RECYCLE_BATCH_COUNT 32 | 24 | #define RDS_IB_RECYCLE_BATCH_COUNT 32 |
25 | 25 | ||
26 | extern struct rw_semaphore rds_ib_devices_lock; | ||
26 | extern struct list_head rds_ib_devices; | 27 | extern struct list_head rds_ib_devices; |
27 | 28 | ||
28 | /* | 29 | /* |