svn commit: r307207 - stable/10/sys/dev/hyperv/vmbus
Sepherosa Ziehau
sephe at FreeBSD.org
Thu Oct 13 08:50:20 UTC 2016
Author: sephe
Date: Thu Oct 13 08:50:18 2016
New Revision: 307207
URL: https://svnweb.freebsd.org/changeset/base/307207
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/10/sys/dev/hyperv/vmbus/vmbus_chan.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c
==============================================================================
--- stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Oct 13 08:47:51 2016 (r307206)
+++ stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Oct 13 08:50:18 2016 (r307207)
@@ -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);
More information about the svn-src-stable-10
mailing list