Message ID | 20090604124807.10544.6071.stgit@dev.haskins.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/eventfd.c b/fs/eventfd.c index 3f0e197..72f5f8d 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -61,7 +61,15 @@ EXPORT_SYMBOL_GPL(eventfd_signal); static int eventfd_release(struct inode *inode, struct file *file) { - kfree(file->private_data); + struct eventfd_ctx *ctx = file->private_data; + + /* + * No need to hold the lock here, since we are on the file cleanup + * path and the ones still attached to the wait queue will be + * serialized by wake_up_locked_poll(). + */ + wake_up_locked_poll(&ctx->wqh, POLLHUP); + kfree(ctx); return 0; }