Date: Mon, 28 Nov 2016 07:04:32 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309237 - head/sys/dev/hyperv/vmbus Message-ID: <201611280704.uAS74WeJ030144@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Mon Nov 28 07:04:32 2016 New Revision: 309237 URL: https://svnweb.freebsd.org/changeset/base/309237 Log: hyperv/vmbus: Stringent GPADL parameter assertion. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8632 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Mon Nov 28 06:53:00 2016 (r309236) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Mon Nov 28 07:04:32 2016 (r309237) @@ -502,11 +502,7 @@ vmbus_chan_gpadl_connect(struct vmbus_ch 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 @@ vmbus_chan_gpadl_disconnect(struct vmbus 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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611280704.uAS74WeJ030144>