summaryrefslogtreecommitdiff
path: root/sys/dev/pv/hyperv.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-08 21:43:25 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-08 21:43:25 +0000
commit56f28c51400b8ca21246c20b65758271276f8623 (patch)
treefe6581379b6ca1fc7d31c5d4a34a5647a4c9f2b2 /sys/dev/pv/hyperv.c
parent1f7bd24d8db36bb514b683bbc7e94f7623675f70 (diff)
Reserve extra space for the bufring header structure
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r--sys/dev/pv/hyperv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index 1ced9f893e1..70b4c503297 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -1074,7 +1074,7 @@ hv_channel_ring_create(struct hv_channel *ch, uint32_t buflen)
{
struct hv_softc *sc = ch->ch_sc;
- buflen = roundup(buflen, PAGE_SIZE);
+ buflen = roundup(buflen, PAGE_SIZE) + sizeof(struct vmbus_bufring);
ch->ch_ring = km_alloc(2 * buflen, &kv_any, &kp_zero, cold ?
&kd_nowait : &kd_waitok);
if (ch->ch_ring == NULL) {