Commit 90b54129 authored by Oliver Upton's avatar Oliver Upton Committed by Paolo Bonzini
Browse files

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: default avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarOliver Upton <oupton@google.com>
Message-Id: <20210921171121.2148982-2-oupton@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 03a6e840
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static void *uffd_handler_thread_fn(void *arg)
			return NULL;
		}

		if (!pollfd[0].revents & POLLIN)
		if (!(pollfd[0].revents & POLLIN))
			continue;

		r = read(uffd, &msg, sizeof(msg));