eventfd/kaio integration fix
commit0232995711395b1a4f1bc6af1bfc637ae8cd0d97
authorDavide Libenzi <davidel@xmailserver.org>
Fri, 11 Apr 2008 04:29:19 +0000 (10 21:29 -0700)
committerOliver Pinter <oliver.pntr@gmail.com>
Mon, 21 Apr 2008 15:08:19 +0000 (21 17:08 +0200)
tree26127c1c3c54910affa62beed6b883fbe0cf346f
parente2e9f307ca1d4becb3793742dde274fb89a19a2f
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