From: Ira Weiny <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
---
src/acm.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/acm.c b/src/acm.c
index c5da791..ebb48f4 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -92,7 +92,7 @@ enum acm_addr_preload {
};
/*
- * Nested locking order: dest -> ep, dest -> port
+ * Nested locking order: dest -> ep, dest -> port, port -> ep
*/
struct acm_dest {
uint8_t address[ACM_MAX_ADDRESS]; /* keep first */
@@ -1830,8 +1830,12 @@ acm_get_port_ep(struct acm_port *port, struct
acm_ep_addr_data *data)
(!data->info.path.pkey || (ntohs(data->info.path.pkey) ==
ep->pkey)))
return ep;
- if (acm_addr_index(ep, data->info.addr, (uint8_t) data->type)
>= 0)
+ lock_acquire(&ep->lock);
+ if (acm_addr_index(ep, data->info.addr, (uint8_t) data->type)
>= 0) {
+ lock_release(&ep->lock);
return ep;
+ }
+ lock_release(&ep->lock);
}
return NULL;
--
1.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html