svn commit: r309236 - head/sys/dev/hyperv/vmbus
Sepherosa Ziehau
sephe at FreeBSD.org
Mon Nov 28 06:53:01 UTC 2016
Author: sephe
Date: Mon Nov 28 06:53:00 2016
New Revision: 309236
URL: https://svnweb.freebsd.org/changeset/base/309236
Log:
hyperv/vmbus: Make sure that the allocated GPADL is not zero.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8631
Modified:
head/sys/dev/hyperv/vmbus/vmbus.c
Modified: head/sys/dev/hyperv/vmbus/vmbus.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/vmbus.c Mon Nov 28 06:40:26 2016 (r309235)
+++ head/sys/dev/hyperv/vmbus/vmbus.c Mon Nov 28 06:53:00 2016 (r309236)
@@ -325,7 +325,13 @@ vmbus_msghc_wakeup(struct vmbus_softc *s
uint32_t
vmbus_gpadl_alloc(struct vmbus_softc *sc)
{
- return atomic_fetchadd_int(&sc->vmbus_gpadl, 1);
+ uint32_t gpadl;
+
+again:
+ gpadl = atomic_fetchadd_int(&sc->vmbus_gpadl, 1);
+ if (gpadl == 0)
+ goto again;
+ return (gpadl);
}
static int
More information about the svn-src-all
mailing list