提交 90b54129 编写于 作者: O Oliver Upton 提交者: Paolo Bonzini

selftests: KVM: Fix check for !POLLIN in demand_paging_test

The logical not operator applies only to the left hand side of a bitwise
operator. As such, the check for POLLIN not being set in revents wrong.
Fix it by adding parentheses around the bitwise expression.

Fixes: 4f72180e ("KVM: selftests: Add demand paging content to the demand paging test")
Reviewed-by: NAndrew Jones <drjones@redhat.com>
Signed-off-by: NOliver Upton <oupton@google.com>
Message-Id: <20210921171121.2148982-2-oupton@google.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 03a6e840
...@@ -179,7 +179,7 @@ static void *uffd_handler_thread_fn(void *arg) ...@@ -179,7 +179,7 @@ static void *uffd_handler_thread_fn(void *arg)
return NULL; return NULL;
} }
if (!pollfd[0].revents & POLLIN) if (!(pollfd[0].revents & POLLIN))
continue; continue;
r = read(uffd, &msg, sizeof(msg)); r = read(uffd, &msg, sizeof(msg));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册