Commit 27e71125 authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

perf kvm: Fix debug assertion



There are 2 slots left for kvm_add_default_arch_event, fix the
assertion so that debug builds don't fail the assert and to agree with
the comment.

Fixes: 45ff39f6 ("perf tools kvm: Fix the potential out of range memory access issue")
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 492689ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2014,7 +2014,7 @@ static int __cmd_record(const char *file_name, int argc, const char **argv)
	for (j = 1; j < argc; j++, i++)
		rec_argv[i] = STRDUP_FAIL_EXIT(argv[j]);

	BUG_ON(i != rec_argc);
	BUG_ON(i + 2 != rec_argc);

	ret = kvm_add_default_arch_event(&i, rec_argv);
	if (ret)