artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cfd581
)
Read events array offset must be calculated in bytes
author
mikeb
<mikeb@openbsd.org>
Fri, 5 Aug 2016 18:12:20 +0000
(18:12 +0000)
committer
mikeb
<mikeb@openbsd.org>
Fri, 5 Aug 2016 18:12:20 +0000
(18:12 +0000)
sys/dev/pv/hyperv.c
patch
|
blob
|
history
diff --git
a/sys/dev/pv/hyperv.c
b/sys/dev/pv/hyperv.c
index
b7970a0
..
1e59669
100644
(file)
--- a/
sys/dev/pv/hyperv.c
+++ b/
sys/dev/pv/hyperv.c
@@
-693,7
+693,8
@@
hv_vmbus_connect(struct hv_softc *sc)
}
sc->sc_wevents = (uint32_t *)sc->sc_events;
- sc->sc_revents = (uint32_t *)sc->sc_events + (PAGE_SIZE >> 1);
+ sc->sc_revents = (uint32_t *)((caddr_t)sc->sc_events +
+ (PAGE_SIZE >> 1));
sc->sc_monitor[0] = km_alloc(PAGE_SIZE, &kv_any, &kp_zero, &kd_nowait);
if (sc->sc_monitor == NULL) {