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

2014-03-31 Thread Kay Sievers
On Mon, Mar 31, 2014 at 2:41 AM, Djalal Harouni  wrote:

>  endpoint.c | 2 ++

Applied.

Thanks,
Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-30 Thread Djalal Harouni
Signed-off-by: Djalal Harouni 
---
 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

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel