Skip to content

Commit 1b9439c

Browse files
Gavin Shansean-jc
authored andcommitted
KVM: selftests: Add missing "break" in rseq_test's param parsing
In commit 0297cdc ("KVM: selftests: Add option to rseq test to override /dev/cpu_dma_latency"), a 'break' is missed before the option 'l' in the argument parsing loop, which leads to an unexpected core dump in atoi_paranoid(). It tries to get the latency from non-existent argument. host$ ./rseq_test -u Random seed: 0x6b8b4567 Segmentation fault (core dumped) Add a 'break' before the option 'l' in the argument parsing loop to avoid the unexpected core dump. Fixes: 0297cdc ("KVM: selftests: Add option to rseq test to override /dev/cpu_dma_latency") Cc: stable@vger.kernel.org # v6.15+ Signed-off-by: Gavin Shan <gshan@redhat.com> Link: https://patch.msgid.link/20251124050427.1924591-1-gshan@redhat.com [sean: describe code change in shortlog] Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 32bd348 commit 1b9439c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/kvm/rseq_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ int main(int argc, char *argv[])
215215
switch (opt) {
216216
case 'u':
217217
skip_sanity_check = true;
218+
break;
218219
case 'l':
219220
latency = atoi_paranoid(optarg);
220221
break;

0 commit comments

Comments
 (0)