Re: [TOMOYO 05/15](repost) Domain transition handler functions.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Wednesday, October 3, 2007 - 7:07 am

On Wed, 2007-10-03 at 22:59 +0900, Tetsuo Handa wrote:

You can indeed not sleep in an rcu_read_lock() section. However, you
could grab a reference on an item, stop the iteration, drop
rcu_read_lock. Do you thing, re-acquire rcu_read_lock(), drop the ref,
and continue the iteration.

Also, how do you avoid referencing dead data with your sll? I haven't
actually looked at your patches, but the simple scheme you outlined
didn't handle the iteration + concurrent removal scenario:

thread 1             thread 2

 foo = ptr->next

 < schedule >

                     killme = ptr->next (same item)
                     ptr->next = ptr->next->next;
                     kfree(killme)

                     < schedule >

 foo->bar <-- *BANG*

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[TOMOYO 06/15](repost) Auditing interface., Kentaro Takeda, (Tue Oct 2, 12:33 am)
[TOMOYO 07/15](repost) File access control functions., Kentaro Takeda, (Tue Oct 2, 12:34 am)
[TOMOYO 08/15](repost) Argv[0] access control functions., Kentaro Takeda, (Tue Oct 2, 12:35 am)
[TOMOYO 12/15](repost) LSM adapter for TOMOYO., Kentaro Takeda, (Tue Oct 2, 12:38 am)
[TOMOYO 13/15](repost) Conditional permission support., Kentaro Takeda, (Tue Oct 2, 12:39 am)
[TOMOYO 14/15](repost) LSM expansion for TOMOYO Linux., Kentaro Takeda, (Tue Oct 2, 12:39 am)
Re: [TOMOYO 05/15](repost) Domain transition handler funct ..., YOSHIFUJI Hideaki / , (Tue Oct 2, 6:00 am)
Re: [TOMOYO 05/15](repost) Domain transition handler funct ..., YOSHIFUJI Hideaki / , (Wed Oct 3, 4:43 am)
Re: [TOMOYO 05/15](repost) Domain transition handler funct ..., YOSHIFUJI Hideaki / , (Wed Oct 3, 6:11 am)
Re: [TOMOYO 05/15](repost) Domain transition handler funct ..., Peter Zijlstra, (Wed Oct 3, 7:07 am)
Re: [TOMOYO 05/15](repost) Domain transition handler funct ..., YOSHIFUJI Hideaki / , (Wed Oct 3, 7:32 am)
Sleeping in RCU list traversal, Tetsuo Handa, (Sun Oct 7, 3:38 am)