sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size. That fixes vmstat -i with kvm backend. Submitted by: peter Approved by: re (kib)
This commit is contained in:
parent
54257e2cbd
commit
8953ac4334
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224198
@ -1153,8 +1153,8 @@ dointr(void)
|
||||
|
||||
uptime = getuptime();
|
||||
if (kd != NULL) {
|
||||
intrcntlen = namelist[X_SINTRCNT].n_value;
|
||||
inamlen = namelist[X_SINTRNAMES].n_value;
|
||||
kread(X_SINTRCNT, &intrcntlen, sizeof(intrcntlen));
|
||||
kread(X_SINTRNAMES, &inamlen, sizeof(inamlen));
|
||||
if ((intrcnt = malloc(intrcntlen)) == NULL ||
|
||||
(intrname = malloc(inamlen)) == NULL)
|
||||
err(1, "malloc()");
|
||||
|
Loading…
Reference in New Issue
Block a user