]> git.baikalelectronics.ru Git - kernel.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)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:16:44 +0000 (18:16 -0700)
commitfd6f081932e9a0a2d504d7440eb16b560801b439
tree68952e283e4b119622c6e8244d96e41c623ae4b0
parent4c7e7809c875b2676da2f6791a45110c4f197057
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>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_rdma.c