svn commit: r306074 - head/sys/dev/hyperv/vmbus

Sepherosa Ziehau sephe at FreeBSD.org
Wed Sep 21 06:43:53 UTC 2016


Author: sephe
Date: Wed Sep 21 06:43:52 2016
New Revision: 306074
URL: https://svnweb.freebsd.org/changeset/base/306074

Log:
  hyperv/vmbus: Assert that the bufring address is page aligned.
  
  MFC after:	1 week
  Sponsored by:	Microsoft
  Differential Revision:	https://reviews.freebsd.org/D7962

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	Wed Sep 21 06:27:42 2016	(r306073)
+++ head/sys/dev/hyperv/vmbus/vmbus_chan.c	Wed Sep 21 06:43:52 2016	(r306074)
@@ -250,6 +250,8 @@ vmbus_chan_open_br(struct vmbus_channel 
 	    ("send bufring size is not multiple page"));
 	KASSERT((rxbr_size & PAGE_MASK) == 0,
 	    ("recv bufring size is not multiple page"));
+	KASSERT((cbr->cbr_paddr & PAGE_MASK) == 0,
+	    ("bufring is not page aligned"));
 
 	/*
 	 * Zero out the TX/RX bufrings, in case that they were used before.


More information about the svn-src-head mailing list