public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: serue@us.ibm.com, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] TOMOYO: Add garbage collector support. (v2)
Date: Mon, 1 Jun 2009 20:03:49 -0500	[thread overview]
Message-ID: <20090602010349.GB20977@hallyn.com> (raw)
In-Reply-To: <200906020030.n520UU1D087893@www262.sakura.ne.jp>

Quoting Tetsuo Handa (penguin-kernel@i-love.sakura.ne.jp):
> Serge E. Hallyn wrote:
> > Can't you just move the deleted item from the live list to some dead
> > list, using the same ->list list_head?
> 
> I think I can't. If we do list_add(&p->entry.list, &dead_list) after
> list_del_rcu(&p->entry.list) when p->entry.users != 0, p->entry.list.next will
> point to an element on dead list. And reader will no longer be able to resume
> travarsal on the live list.

Use rcu?  Take your spinlock, take entry off the list, wait an rcu cycle,
then move to the dead_list.

All readers should walk the list under rcu_read_lock, so if the manage
to reach ->entry, then entry.list->next will be a valid entry on the live
list until the next rcu cycle.

BTW I'm not telling you have to do this, so if you just don't want to, then
just say so.  But so long as you come back to me with technical reasons
why you can't, then I take it you're interested in a technical solution :)
and can't help but respond...

-serge

  reply	other threads:[~2009-06-02  0:57 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 13:31 [TOMOYO 0/2] Final patches for kenrel 2.6.30 Tetsuo Handa
2009-04-08 13:31 ` [TOMOYO 1/2] tomoyo: add Documentation/tomoyo.txt Tetsuo Handa
2009-04-10 12:26   ` Peter Dolding
2009-04-10 17:10   ` Pavel Machek
2009-04-13  2:04     ` Tetsuo Handa
2009-04-29 13:13       ` Pavel Machek
2009-05-01 10:24       ` Pavel Machek
2009-05-01 13:07         ` Tetsuo Handa
2009-05-03 21:56           ` Pavel Machek
2009-05-04  6:24             ` Tetsuo Handa
2009-05-06 12:16               ` Tetsuo Handa
2009-05-07 11:42                 ` [TOMOYO] Add garbage collector support Tetsuo Handa
2009-05-08  1:43                   ` James Morris
2009-05-08  2:10                     ` Tetsuo Handa
2009-05-08  8:26                       ` James Morris
2009-05-08  9:22                         ` Tetsuo Handa
2009-05-08  9:32                   ` Pavel Machek
2009-05-14 12:08                 ` [PATCH] TOMOYO: Add garbage collector support. (v2) Tetsuo Handa
2009-05-15  1:49                   ` James Morris
2009-05-16 12:07                     ` Tetsuo Handa
2009-05-25  0:37                       ` Tetsuo Handa
2009-05-25  0:39                         ` Tetsuo Handa
2009-05-25  0:41                           ` Tetsuo Handa
2009-05-27  0:16                             ` Paul E. McKenney
2009-05-27  1:25                               ` Tetsuo Handa
2009-05-27  4:12                                 ` Paul E. McKenney
2009-06-01 13:27                             ` Tetsuo Handa
2009-06-02  0:11                               ` Serge E. Hallyn
2009-06-02  0:30                                 ` Tetsuo Handa
2009-06-02  1:03                                   ` Serge E. Hallyn [this message]
2009-06-02  1:16                                     ` Tetsuo Handa
2009-06-02  3:35                                       ` Paul E. McKenney
2009-04-08 13:31 ` [TOMOYO 2/2] Hello Tetsuo Handa
2009-04-10 11:55   ` Tetsuo Handa

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=20090602010349.GB20977@hallyn.com \
    --to=serge@hallyn.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=serue@us.ibm.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