The patch titled eventfd/kaio integration fix has been removed from the -mm tree. Its filename was eventfd-kaio-integration-fix.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: eventfd/kaio integration fix From: Davide Libenzi <davidel@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> Cc: Zach Brown <zach.brown@xxxxxxxxxx> Cc: Jeff Roberson <jroberson@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/aio.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff -puN fs/aio.c~eventfd-kaio-integration-fix fs/aio.c --- a/fs/aio.c~eventfd-kaio-integration-fix +++ a/fs/aio.c @@ -936,14 +936,6 @@ int aio_complete(struct kiocb *iocb, lon return 1; } - /* - * Check if the user asked us to deliver the result through an - * eventfd. The eventfd_signal() function is safe to be called - * from IRQ context. - */ - if (!IS_ERR(iocb->ki_eventfd)) - eventfd_signal(iocb->ki_eventfd, 1); - info = &ctx->ring_info; /* add a completion event to the ring buffer. @@ -992,6 +984,15 @@ int aio_complete(struct kiocb *iocb, lon kunmap_atomic(ring, KM_IRQ1); pr_debug("added to ring %p at [%lu]\n", iocb, tail); + + /* + * Check if the user asked us to deliver the result through an + * eventfd. The eventfd_signal() function is safe to be called + * from IRQ context. + */ + if (!IS_ERR(iocb->ki_eventfd)) + eventfd_signal(iocb->ki_eventfd, 1); + put_rq: /* everything turned out well, dispose of the aiocb. */ ret = __aio_put_req(ctx, iocb); _ Patches currently in -mm which might be from davidel@xxxxxxxxxxxxxxx are epoll-avoid-kmemcheck-warning.patch fs-timerfdc-should-include-linux-syscallsh.patch signals-send_signal-be-paranoid-about-signalfd_notify.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html