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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <a.p.zijlstra@...>
Cc: <jmorris@...>, <linux-kernel@...>, <linux-security-module@...>, <chrisw@...>
Date: Wednesday, October 3, 2007 - 10:19 am

Hello.

Thank you for pointing out.

Peter Zijlstra wrote:
Excuse me, but I didn't understand why (4) and (5) are needed.

append_function() {

  down(semaphore_for_write_protect);
  ...
  ptr = head;
  while (ptr->next) ptr = ptr->next;
  ptr->next = new_entry;
  ...
  up(semaphore_for_write_protect);

}

read_function() {

  for (ptr = head; ptr; ptr = ptr->next) {
    ...
  }

}

Are (4) and (5) needed even when (3) is exclusively protected by down() and up() ?

Regards.

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

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