Index: sys/dev/hyperv/vmbus/vmbus_chan.c =================================================================== --- sys/dev/hyperv/vmbus/vmbus_chan.c +++ sys/dev/hyperv/vmbus/vmbus_chan.c @@ -502,11 +502,7 @@ int page_count, range_len, i, cnt, error; uint64_t page_id; - /* - * Reset GPADL, so that the result would consistent, if error - * happened later on. - */ - *gpadl0 = 0; + KASSERT(*gpadl0 == 0, ("GPADL is not zero")); /* * Preliminary checks. @@ -652,6 +648,8 @@ struct vmbus_chanmsg_gpadl_disconn *req; int error; + KASSERT(gpadl != 0, ("GPADL is zero")); + mh = vmbus_msghc_get(sc, sizeof(*req)); if (mh == NULL) { vmbus_chan_printf(chan,