[systemd-devel] [PATCH 2/4] endpoint: protect the idr tree on release

Djalal Harouni tixxdz at opendz.org
Sun Mar 30 17:41:24 PDT 2014


Signed-off-by: Djalal Harouni <tixxdz at opendz.org>
---
 endpoint.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/endpoint.c b/endpoint.c
index 66b4de5..f37b80a 100644
--- a/endpoint.c
+++ b/endpoint.c
@@ -104,7 +104,9 @@ void kdbus_ep_disconnect(struct kdbus_ep *ep)
 		ep->dev = NULL;
 	}
 	if (ep->minor > 0) {
+		mutex_lock(&ep->bus->domain->lock);
 		idr_remove(&ep->bus->domain->idr, ep->minor);
+		mutex_unlock(&ep->bus->domain->lock);
 		ep->minor = 0;
 	}
 }
-- 
1.8.5.3



More information about the systemd-devel mailing list