Skip to content
Commit 0fcc1029 authored by Gavin Shan's avatar Gavin Shan Committed by Paolo Bonzini
Browse files

KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test



sched_getcpu() is glibc dependent and it can simply return the CPU
ID from the registered rseq information, as Florian Weimer pointed.
In this case, it's pointless to compare the return value from
sched_getcpu() and that fetched from the registered rseq information.

Fix the issue by replacing sched_getcpu() with getcpu(), as Florian
suggested. The comments are modified accordingly by replacing
"sched_getcpu()" with "getcpu()".

Reported-by: default avatarYihuang Yu <yihyu@redhat.com>
Suggested-by: default avatarFlorian Weimer <fweimer@redhat.com>
Suggested-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Suggested-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
Message-Id: <20220810104114.6838-3-gshan@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 66d42ac7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment