[systemd-devel] [PATCH v2 0/7] kdbus: improve user domain accounting

Djalal Harouni tixxdz at opendz.org
Thu Jul 31 10:45:59 PDT 2014


On Thu, Jul 31, 2014 at 05:35:41PM +0200, Kay Sievers wrote:
> On Wed, Jul 30, 2014 at 10:11 PM, Djalal Harouni <tixxdz at opendz.org> wrote:
> > This is series v2 of:
> > http://lists.freedesktop.org/archives/systemd-devel/2014-July/021526.html
> >
> > This series improves user domain accounting and fixes some bugs.
> >
> > It should go on top of the "kdbus: allow multiple policies" series:
> > http://lists.freedesktop.org/archives/systemd-devel/2014-July/021514.html
> >
> > The v2 fixes the race previously discussed but not fixed in v1 and which
> > was inherited from kdbus_domain_user_find_or_new().
> >
> > If kdbus_domain_user_find_or_new() is called with same parameters and
> > if we do not find a previously linked domain user, then we release the
> > domain lock, and both threads will race to assign a different ID for the
> > same uid, thus, invalidating the users array. We fix this in this series
> > by using a new kdbus_domain_user_account() function which takes the same
> > domain lock to perform both find a previously domain user or create and
> > link a new one.
> >
> > Summary:
> > Patches 1, 2 and 3 are preparation patches to improve the code.
> 
> In the future, please do not split up patches which just add or remove
> dead code. Just add the code with the patch that uses it. Larger
> patches are just as readable as several smaller ones which are just
> artificially split up.
Ok, sorry did want some incremental changes so I can test them easily,
and was also lazy...

Ok, next patches I'll do. Thank you for applying!

-- 
Djalal Harouni
http://opendz.org


More information about the systemd-devel mailing list