[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906020116.n521GsHk097628@www262.sakura.ne.jp>
Date: Tue, 02 Jun 2009 10:16:54 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: serge@...lyn.com
Cc: serue@...ibm.com, linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] TOMOYO: Add garbage collector support. (v2)
Serge E. Hallyn wrote:
> 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.
I have to tell you one thing.
Reader traverses the list via read(2) system call.
It means that reader can't read all elements in the list within a single
read(2) system call.
Thus, reader grabs a reference on an element (i.e. p->entry.users) before
leaving reader section and drops that reference after entering reader section.
Yes, it would be possible for readers to walk the list under rcu_read_lock(),
but it is not sufficient for GC to simply call synchronize_rcu(). GC has to
wait for p->entry.users to become 0 before modifying p->entry.list.next .
> 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...
I see. I'll post only (1) and (2).
Thank you for your suggestion and time.
--
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