Fix: common: poll: compat_poll_wait never finishes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Oct 2020 18:43:39 +0000 (14:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Oct 2020 20:23:44 +0000 (16:23 -0400)
commit1a8c9d1d35d4d71aac912f2dc2eceebb84b4eb8b
treeb921b5524bf82d0a573ab1aaa44b429fd85c9fb7
parentad951089020f45fa39a41030e0639f4dee512ddc
Fix: common: poll: compat_poll_wait never finishes

compat_poll_wait hangs when poll returns an array of file
descriptors of the form:
  [ Inactive Active ]

The logic to find the first idle pollfd entry is bogus and actually
skips the first idle entry. This causes the follow-up loop to never
conclude.

The pollfd array defragmentation logic is re-written in a simpler
style to handle those cases appropriately.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8669a870df1ec1160f05e35e83671917bb80d6f9
src/common/compat/compat-poll.c
This page took 0.027801 seconds and 4 git commands to generate.