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, 13 Mar 2009 09:54:15 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	"Serge E. Hallyn" <serue@...ibm.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Paul Menage <menage@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux Containers <containers@...ts.linux-foundation.org>
Subject: Re: [PATCH] devcgroup: avoid using cgroup_lock

>> @@ -426,11 +431,11 @@ static int devcgroup_access_write(struct cgroup *cgrp, struct cftype *cft,
>>  				  const char *buffer)
>>  {
>>  	int retval;
>> -	if (!cgroup_lock_live_group(cgrp))
> 
> Does it matter that we no longer check for cgroup_is_removed()?
> 

No, this means in a rare case that the write handler is called when the cgroup
is dead, we still do the update work instead of returning ENODEV.

This is ok, since at that time, accessing cgroup and devcgroup is still valid,
but will have no effect since there is no task in this cgroup and the cgroup
will be destroyed soon.

>> -		return -ENODEV;
>> +
>> +	mutex_lock(&devcgroup_mutex);
>>  	retval = devcgroup_update_access(cgroup_to_devcgroup(cgrp),
>>  					 cft->private, buffer);
>> -	cgroup_unlock();
>> +	mutex_unlock(&devcgroup_mutex);
>>  	return retval;
>>  }

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