POLLNVAL is returned on invalid FD. We must also check it. Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
@@ -1617,7 +1617,7 @@ int coroipcs_handler_dispatch (
/*
* If an error occurs, request exit
*/
- if (revent & (POLLERR|POLLHUP)) {
+ if (revent & (POLLERR|POLLHUP|POLLNVAL)) {
ipc_disconnect (conn_info);
return (0);
}
@@ -902,7 +902,7 @@ coroipcc_dispatch_get (
error = CS_ERR_TRY_AGAIN;
goto error_put;
- if (poll_events == 1 && (ufds.revents & (POLLERR|POLLHUP))) {
+ if (poll_events == 1 && (ufds.revents & (POLLERR|POLLHUP|POLLNVAL))) {
error = CS_ERR_LIBRARY;