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]
Message-ID: <20120119112102.GD2649@redhat.com>
Date:	Thu, 19 Jan 2012 06:21:02 -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 05/12] blkcg: update blkg get functions take blkio_cgroup
 as parameter

On Wed, Jan 18, 2012 at 05:11:23PM -0800, Tejun Heo wrote:

[..]
> -static struct throtl_grp * throtl_get_tg(struct throtl_data *td)
> +static struct throtl_grp *throtl_get_tg(struct throtl_data *td,
> +					struct blkio_cgroup *blkcg)
>  {
>  	struct throtl_grp *tg = NULL, *__tg = NULL;
> -	struct blkio_cgroup *blkcg;
>  	struct request_queue *q = td->queue;
>  
>  	/* no throttling for dead queue */
>  	if (unlikely(blk_queue_dead(q)))
>  		return NULL;
>  
> -	blkcg = task_blkio_cgroup(current);
>  	tg = throtl_find_tg(td, blkcg);
>  	if (tg)
>  		return tg;
>  
> +	if (!css_tryget(&blkcg->css))
> +		return NULL;
> +

This reference is to make sure that blkcg does not go away while we drop
the rcu lock and do the group allocation?

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