eventfd/kaio integration fix
commit8807def737cea2b0d813b1f4cfbc1231feadfa92
authorDavide Libenzi <davidel@xmailserver.org>
Fri, 11 Apr 2008 04:29:19 +0000 (10 21:29 -0700)
committerOliver Pinter <oliver.pntr@gmail.com>
Mon, 14 Apr 2008 18:16:47 +0000 (14 20:16 +0200)
tree81f69f315e3838fb13b2fd1aba1477e5bfabf3ab
parent4c613a353e2811095cfc3de66be16c266c55ad82
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>
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
fs/aio.c