diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-08-05 18:12:21 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-08-05 18:12:21 +0000 |
commit | 694a73747a11d988c9ca3b3df199a64289612e21 (patch) | |
tree | b591d00edee73d2ef07a8a4e908cdd18ac392ad4 /sys/dev/pv/hyperv.c | |
parent | 048eeeea4355d96d76baa42b68fe9dc43dd50777 (diff) |
Read events array offset must be calculated in bytes
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r-- | sys/dev/pv/hyperv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c index b7970a092f1..1e5966934fb 100644 --- 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) { |