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

KAMEZAWA Hiroyuki wrote:
> On Mon, 15 Dec 2008 11:43:49 +0100
> Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> 
>>> +                if (cgroup_is_removed(cgroup) || !cgroup->dentry)
>>> +                        return;
>>>  		cgroup_path(cgroup, path, sizeof(path));
>>> +	}
>> Perhaps wrap that check in a cgroup_*() helper? That would avoid the
>> duplication, be clearer and not open code the ->dentry assumption.
>>
>> cgroup_is_active() perhaps?
>>

We are fixing this particular race, so open code and comment can document
the problem clearer.

And this wrapper shouldn't be used by other cgroup users, if one needs to
do these checks, he should have a reason and comment is needed to explain
what's happening.

Also, I can't think out an appropriate name..

> 
> I vote for cgroup_is_populated().
> 

But non-populated means the directory isn't filled up with control files,
this function name doesn't indicate if the dir dentry itself is valid or not..

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