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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 2 Feb 2012 15:03:18 -0500
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	axboe@...nel.dk, ctalbott@...gle.com, rni@...gle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/11] blkcg: let blkio_group point to blkio_cgroup
 directly

On Wed, Feb 01, 2012 at 01:19:06PM -0800, Tejun Heo wrote:
> Currently, blkg points to the associated blkcg via its css_id.  This
> unnecessarily complicates dereferencing blkcg.  Let blkg hold a
> reference to the associated blkcg and point directly to it and disable
> css_id on blkio_subsys.
> 
> This change requires splitting blkiocg_destroy() into
> blkiocg_pre_destroy() and blkiocg_destroy() so that all blkg's can be
> destroyed and all the blkcg references held by them dropped during
> cgroup removal.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Vivek Goyal <vgoyal@...hat.com>

[..]
> +static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup)
> +{
> +	struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgroup);
> +
>  	if (blkcg != &blkio_root_cgroup)
>  		kfree(blkcg);

Hi Tejun,

What makes sure that all the blkg are gone and they have dropped their
reference to blkcg? IIUC, pre-destroy will just make sure to decouple
blkg from request queue as well as blkcg list and also drop joint cgroup
and request queue reference.

But there could well be some IO queued in the group which might have
its own reference and will be dropped later when IO completes. So at
the time of blkiocg_destroy() it is not guranteed that there are
no reference holders to blkcg?

Thanks
Vivek
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ