From cafa9ccd2e6af29c92eed8a5062ef5681b678e42 Mon Sep 17 00:00:00 2001 From: Patrick Mooney Date: Tue, 8 Mar 2016 16:44:15 +0000 Subject: OS-5222 epoll fails to wake when fd added Reviewed by: Jerry Jelinek Reviewed by: Bryan Cantrill --- usr/src/uts/common/io/devpoll.c | 7 +++++-- 1 file 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 @@ -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); -- cgit v1.2.3