Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Oct 2016 08:39:17 +0000 (UTC)
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r307510 - stable/11/sys/dev/hyperv/vmbus
Message-ID:  <201610170839.u9H8dHMU037591@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sephe
Date: Mon Oct 17 08:39:17 2016
New Revision: 307510
URL: https://svnweb.freebsd.org/changeset/base/307510

Log:
  MFC 305789
  
      hyperv/vmbus: Make sure that the sub-channel count is valid.
  
      Sponsored by:   Microsoft
      Differential Revision:  https://reviews.freebsd.org/D7865

Modified:
  stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c
==============================================================================
--- stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c	Mon Oct 17 08:38:24 2016	(r307509)
+++ stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c	Mon Oct 17 08:39:17 2016	(r307510)
@@ -1346,6 +1346,8 @@ vmbus_subchan_get(struct vmbus_channel *
 	struct vmbus_channel **ret, *chan;
 	int i;
 
+	KASSERT(subchan_cnt > 0, ("invalid sub-channel count %d", subchan_cnt));
+
 	ret = malloc(subchan_cnt * sizeof(struct vmbus_channel *), M_TEMP,
 	    M_WAITOK);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610170839.u9H8dHMU037591>