[PATCH] Network engine poll() paranoia
[fio.git] / engines / net.c
index c30f7f5bb6131f010c06ac9008bf3a06829b0e7d..02314515d4f70866c886bc792a54fdd54fc3b522 100644 (file)
@@ -179,6 +179,12 @@ static int fio_netio_accept_connections(struct thread_data *td, int fd,
                } else if (!ret)
                        continue;
 
+               /*
+                * should be impossible
+                */
+               if (!(pfd.revents & POLLIN))
+                       continue;
+
                for_each_file(td, f, i) {
                        if (f->fd != -1)
                                continue;