Re: [PATCH] cgroup: list_for_each cleanup

From: KOSAKI Motohiro
Date: Wed Jun 04 2008 - 05:20:27 EST


> > - while (!list_empty(&release_list)) {
> > +
> > + list_for_each_entry_safe(cgrp, saved_cgrp, &release_list,
> > + release_list) {
> > char *argv[3], *envp[3];
> > int i;
> > char *pathbuf;
> > - struct cgroup *cgrp = list_entry(release_list.next,
> > - struct cgroup,
> > - release_list);
> > +
>
> I don't think that list_for_each_entry_safe() is still safe when we've
> dropped release_list_lock. saved_cgroup could end up pointing to a
> cgroup that's freed while we're forking the usermode helper.

Ah, you are right.
I'll drop this portion and resend patch.

Thanks.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/