aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma.h
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2012-04-28 07:40:01 +0200
committerRoland Dreier <roland@purestorage.com>2012-05-08 11:17:48 -0700
commit3e4d60a82e7ab4cd6e212b6834c6a48c79731957 (patch)
tree9e03784ae5e92144ac5b19a8e76d0342118162c9 /drivers/infiniband/hw/ocrdma/ocrdma.h
parentRDMA/ocrdma: Remove write-only variables (diff)
downloadlinux-dev-3e4d60a82e7ab4cd6e212b6834c6a48c79731957.tar.xz
linux-dev-3e4d60a82e7ab4cd6e212b6834c6a48c79731957.zip
RDMA/ocrdma: Don't sleep in atomic notifier handler
Events sent to ocrdma_inet6addr_event() are sent from an atomic context, therefore we can't try to lock a mutex within the notifier callback. We could just switch the mutex to a spinlock since all it does it protect a list, but I've gone ahead and switched the list to use RCU instead. I couldn't fully test it since I don't have IB hardware, so if it doesn't fully work for some reason let me know and I'll switch it back to using a spinlock. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> [ Fixed locking in ocrdma_add(). - Roland ] Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma.h')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma.h b/drivers/infiniband/hw/ocrdma/ocrdma.h
index d7a44b812dfc..85a69c958559 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma.h
+++ b/drivers/infiniband/hw/ocrdma/ocrdma.h
@@ -168,6 +168,7 @@ struct ocrdma_dev {
struct be_dev_info nic_info;
struct list_head entry;
+ struct rcu_head rcu;
int id;
};