]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDS/IB: protect the list of IB devices
authorZach Brown <zach.brown@oracle.com>
Thu, 15 Jul 2010 19:34:33 +0000 (12:34 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:25 +0000 (16:41 -0700)
commit7dd4dba0bb6cb531fd30fa57976011e53cf06090
tree26ae4d6d0bec462b3e5737d15db7d86c577f26c9
parent6c56c6d0736bb6f97cda52117c271e9132390db1
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>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Bang Nguyen <bang.nguyen@oracle.com>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_rdma.c