Re: [PATCH] timerfd/eventfd context lock doesn't protect against poll_wait

2007-05-18 Thread Linus Torvalds
On Thu, 17 May 2007, Davide Libenzi wrote: > > Thx Davi, patch is correct. Nice catch. But at this point instead of > ending up getting two locks, we may look into using Andrew suggestion of > reusing the waitqueue lock. Is it universally considered a "legal" > operation? Yes. Perhaps not fo

Re: [PATCH] timerfd/eventfd context lock doesn't protect against poll_wait

2007-05-17 Thread Andrew Morton
On Thu, 17 May 2007 23:20:05 -0700 (PDT) Davide Libenzi <[EMAIL PROTECTED]> wrote: > On Fri, 18 May 2007, Davi Arnaut wrote: > > > Hi, > > > > poll_wait() callback may modify the waitqueue without holding the > > context private lock. > > Thx Davi, patch is correct. Nice catch. But at this poi

Re: [PATCH] timerfd/eventfd context lock doesn't protect against poll_wait

2007-05-17 Thread Davide Libenzi
On Fri, 18 May 2007, Davi Arnaut wrote: > Hi, > > poll_wait() callback may modify the waitqueue without holding the > context private lock. Thx Davi, patch is correct. Nice catch. But at this point instead of ending up getting two locks, we may look into using Andrew suggestion of reusing the

[PATCH] timerfd/eventfd context lock doesn't protect against poll_wait

2007-05-17 Thread Davi Arnaut
Hi, poll_wait() callback may modify the waitqueue without holding the context private lock. Signed-off-by: Davi E. M. Arnaut <[EMAIL PROTECTED]> diff --git a/fs/eventfd.c b/fs/eventfd.c index 480e2b3..9c672be 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -50,7 +50,7 @@ int eventfd_signal(struc