lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] devcgroup: avoid using cgroup_lock
Quoting Li Zefan (lizf@cn.fujitsu.com):
> >> @@ -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.

Ok, just wanted to make sure the devcgroup couldn't be partially torn
down and risking NULL or freed-memory derefs...

BTW is that against linux-next? (didn't seem to apply cleanly against
my 2.6.29-rc9) I guess I'd like to do a little test before acking,
though it looks ok based on your answer.

thanks,
-serge


\
 
 \ /
  Last update: 2009-03-13 14:45    [W:0.056 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site