lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 24 Nov 2010 15:54:38 -0800 From: Paul Menage <menage@...gle.com> To: Colin Cross <ccross@...roid.com> Cc: Li Zefan <lizf@...fujitsu.com>, containers@...ts.linux-foundation.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 1/2] cgroup: Set CGRP_RELEASABLE when adding to a cgroup On Tue, Nov 23, 2010 at 9:37 PM, Colin Cross <ccross@...roid.com> wrote: > @@ -364,12 +372,8 @@ static void __put_css_set(struct css_set *cg, int taskexit) > struct cgroup *cgrp = link->cgrp; > list_del(&link->cg_link_list); > list_del(&link->cgrp_link_list); > - if (atomic_dec_and_test(&cgrp->count) && > - notify_on_release(cgrp)) { > - if (taskexit) > - set_bit(CGRP_RELEASABLE, &cgrp->flags); > + if (atomic_dec_and_test(&cgrp->count)) > check_for_release(cgrp); > - } We seem to have lost some notify_on_release() checks - maybe move that to check_for_release()? > /* Caller must verify that the css is not for root cgroup */ > +void __css_get(struct cgroup_subsys_state *css, int count) > +{ > + atomic_add(count, &css->refcnt); > + set_bit(CGRP_RELEASABLE, &css->cgroup->flags); > +} Is css_get() the right place to be putting this? It's not clear to me why a subsystem taking a refcount on a cgroup's state should render it releasable when it drops that refcount. Should we maybe clear the CGRP_RELEASABLE flag right before doing the userspace callback? Paul -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists