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:	Fri, 07 May 2010 14:56:05 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	paulmck@...ux.vnet.ibm.com, Jens Axboe <jens.axboe@...cle.com>
CC:	"containers@...ts.osdl.org" <containers@...ts.osdl.org>,
	Paul Menage <menage@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Vivek Goyal <vgoyal@...hat.com>,
	Gui Jianfeng <GuiJianfeng@...fujitsu.com>
Subject: Re: [PATCH 5/5] blk-cgroup: Fix an RCU warning in blkiocg_create()

Paul E. McKenney wrote:
> On Thu, Apr 22, 2010 at 05:32:28PM +0800, Li Zefan wrote:
>> with CONFIG_PROVE_RCU=y, a warning can be triggered:
>>
>>   # mount -t cgroup -o blkio xxx /mnt
>>   # mkdir /mnt/subgroup
>>
>> ...
>> kernel/cgroup.c:4442 invoked rcu_dereference_check() without protection!
>> ...
>>
>> To fix this, we avoid caling css_depth() here, which is a bit simpler
>> than the original code.
> 
> Queued for 2.6.34, thank you!
> 

Seems neither you nor Jens queued this patch...

> 							Thanx, Paul
> 
>> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
>> ---
>>  block/blk-cgroup.c |    8 ++++----
>>  1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
>> index 5fe03de..2cc682b 100644
>> --- a/block/blk-cgroup.c
>> +++ b/block/blk-cgroup.c
>> @@ -286,16 +286,16 @@ done:
>>  static struct cgroup_subsys_state *
>>  blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup)
>>  {
>> -	struct blkio_cgroup *blkcg, *parent_blkcg;
>> +	struct blkio_cgroup *blkcg;
>> +	struct cgroup *parent = cgroup->parent;
>>
>> -	if (!cgroup->parent) {
>> +	if (!parent) {
>>  		blkcg = &blkio_root_cgroup;
>>  		goto done;
>>  	}
>>
>>  	/* Currently we do not support hierarchy deeper than two level (0,1) */
>> -	parent_blkcg = cgroup_to_blkio_cgroup(cgroup->parent);
>> -	if (css_depth(&parent_blkcg->css) > 0)
>> +	if (parent != cgroup->top_cgroup)
>>  		return ERR_PTR(-EINVAL);
>>
>>  	blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL);
>> -- 
>> 1.6.3
>>
>> --
>> 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/
> 
> 
--
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