]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: selftests: Add missing "break" in rseq_test's param parsing
authorGavin Shan <gshan@redhat.com>
Mon, 24 Nov 2025 05:04:27 +0000 (15:04 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:22 +0000 (12:57 +0100)
commit0c01fa83c09beb5095aa16c16b5cc3f8b7220499
tree0a002f9b9a33fef861f12d3757e2f84eac396097
parentcaf68b6da38957e78c8d83df4553542102366449
KVM: selftests: Add missing "break" in rseq_test's param parsing

commit 1b9439c933b500cb24710bbd81fe56e9b0025b6f upstream.

In commit 0297cdc12a87 ("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: 0297cdc12a87 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/kvm/rseq_test.c