lkml.org 
[lkml]   [2008]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] eventfd/kaio integration fix
On Wed, 9 Apr 2008, Andrew Morton wrote:

> On Wed, 9 Apr 2008 11:45:47 -0700 (PDT)
> Davide Libenzi <davidel@xmailserver.org> wrote:
>
> > Jeff Roberson discovered a race when using kaio eventfd based
> > notifications. This patch fixes the race by moving the notification inside
> > the spinlocked section of kaio.
>
> Missing information.
>
> What are the consequences of this race, when it occurs?

This was described in the original email. I posted a patch back then
(waiting for Jeff test feedback - that never came), but then I forgot
about it till now:

http://groups.google.com/group/linux.kernel/browse_thread/thread/e814b54c14198616



> > The operation is safe since eventfd
> > spinlock and kaio one are unrelated.
>
> Yes, it's safe from that perspective.
>
> However with this patch applied, we will no longer run eventfd_signal() if
> kiocbIsCancelled(iocb). Convincing is needed, please?

This was the intended behaviour. No event was actually *ready*, so no need
to signal completion of an event.



- Davide




\
 
 \ /
  Last update: 2008-04-09 21:23    [W:0.092 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site