]> git.baikalelectronics.ru Git - kernel.git/commit
eventfd/kaio integration fix
authorDavide Libenzi <davidel@xmailserver.org>
Fri, 11 Apr 2008 04:29:19 +0000 (21:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Apr 2008 15:06:43 +0000 (08:06 -0700)
commitce3aac6915aeeda89bfd21308c81c6686626e6c7
tree904c70d4ed15dd79a003c34bad2e25cff9522420
parent04536dc3594959826e030ae0323e184fd29a3576
eventfd/kaio integration fix

Jeff Roberson discovered a race when using kaio eventfd based notifications.
When it occurs it can lead tomissed wakeups and hung userspace.

This patch fixes the race by moving the notification inside the spinlocked
section of kaio.  The operation is safe since eventfd spinlock and kaio one
are unrelated.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Jeff Roberson <jroberson@chesapeake.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/aio.c