mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: "Paul Menage" <menage@google.com>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org,
	"Li Zefan" <lizf@cn.fujitsu.com>
Subject: Re: [PATCH] cgroup: list_for_each cleanup
Date: Wed, 04 Jun 2008 18:20:18 +0900	[thread overview]
Message-ID: <20080604181901.941F.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <6599ad830806040211t31d86c57o6836f7cc34faf7f7@mail.gmail.com>

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



      reply	other threads:[~2008-06-04  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04  8:36 KOSAKI Motohiro
2008-06-04  9:11 ` Paul Menage
2008-06-04  9:20   ` KOSAKI Motohiro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080604181901.941F.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®