From: Jens Axboe Date: Sun, 11 Feb 2007 03:44:02 +0000 (+0100) Subject: [PATCH] Network engine poll() paranoia X-Git-Tag: fio-1.12~100 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0c09442b26216aed16f758712f744a2c54726cdb;ds=sidebyside [PATCH] Network engine poll() paranoia A little defensive programming never hurt anyone. Signed-off-by: Jens Axboe --- diff --git a/engines/net.c b/engines/net.c index c30f7f5b..02314515 100644 --- a/engines/net.c +++ b/engines/net.c @@ -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;