summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2016-03-08 16:44:15 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2016-03-08 17:22:52 +0000
commitcafa9ccd2e6af29c92eed8a5062ef5681b678e42 (patch)
treed59984530e498b5c636edcc876c33ef8d06b2ff0
parent48bc46418c502790ab12bdf93d47dda7da3c1684 (diff)
downloadillumos-joyent-cafa9ccd2e6af29c92eed8a5062ef5681b678e42.tar.gz
OS-5222 epoll fails to wake when fd added
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Bryan Cantrill <bryan@joyent.com>
-rw-r--r--usr/src/uts/common/io/devpoll.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/devpoll.c b/usr/src/uts/common/io/devpoll.c
index b359c6c9fa..8c63043d00 100644
--- a/usr/src/uts/common/io/devpoll.c
+++ b/usr/src/uts/common/io/devpoll.c
@@ -25,7 +25,7 @@
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
- * Copyright (c) 2015, Joyent, Inc. All rights reserved.
+ * Copyright 2016 Joyent, Inc.
*/
#include <sys/types.h>
@@ -962,12 +962,15 @@ dpwrite(dev_t dev, struct uio *uiop, cred_t *credp)
}
}
/*
+ * Wake any pollcache waiters so they can check the new descriptors.
+ *
* Any fds added to an recursive-capable pollcache could themselves be
* /dev/poll handles. To ensure that proper event propagation occurs,
- * parent pollcaches are woken so that they can create any needed
+ * parent pollcaches are woken too, so that they can create any needed
* pollcache links.
*/
if (fds_added) {
+ cv_broadcast(&pcp->pc_cv);
pcache_wake_parents(pcp);
}
pollstate_exit(pcp);