git: 8487443792ce - main - bhyve: Don't access vcpumap[vcpu] directly in parse_cpuset().

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 21 Dec 2022 18:34:05 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=8487443792ce67fce21ae32470d6d8c217e93368

commit 8487443792ce67fce21ae32470d6d8c217e93368
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-21 18:33:04 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-12-21 18:33:04 +0000

    bhyve: Don't access vcpumap[vcpu] directly in parse_cpuset().
    
    Reviewed by:    corvink, markj
    Differential Revision:  https://reviews.freebsd.org/D37645
---
 usr.sbin/bhyve/bhyverun.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 31cb7c2ceaf3..c110fecf31b0 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -441,12 +441,12 @@ parse_cpuset(int vcpu, const char *list, cpuset_t *set)
 					errx(4, "Invalid hostcpu range %d-%d",
 					    start, pcpu);
 				while (start < pcpu) {
-					CPU_SET(start, vcpumap[vcpu]);
+					CPU_SET(start, set);
 					start++;
 				}
 				start = -1;
 			}
-			CPU_SET(pcpu, vcpumap[vcpu]);
+			CPU_SET(pcpu, set);
 			break;
 		case '-':
 			if (start >= 0)