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] [day] [month] [year] [list]
Message-ID: <4947776C.10600@cn.fujitsu.com>
Date:	Tue, 16 Dec 2008 17:39:56 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Paul Menage <menage@...gle.com>
CC:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] sched: fix another race when reading /proc/sched_debug

Paul Menage wrote:
> On Sun, Dec 14, 2008 at 5:50 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@...fujitsu.com> wrote:
>> at creation:
>>  - cpu_cgroup_populate() should record "tg" that "this cgroup has valid dentry"
>> at deletion
> 
> Wouldn't moving the call to cgroup_create_dir() to before doing
> subsystem initialization fix this problem more straightforwardly? Then
> by the time the cpu subsytem create() callback is called, dentry will
> already be valid.
> 

Yes, it's true, and actually it was the first idea came into my mind when I
started to fix this bug. But I was not sure whether this is an apropriate way.
Now I think it's ok, and we'd better add a comment to indicate we want to
make cgrp->dentry valid before calling subsystem create() method.

Note in print_cfs_rq(), due to the race, tg->css.cgroup can be NULL.
Fortunately, the code checks this condition, but I think it's just by accident
but not awaring there is a race.
--
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