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
This commit is contained in:
parent
afd4971b7b
commit
fa643a5d0a
@ -325,7 +325,13 @@ vmbus_msghc_wakeup(struct vmbus_softc *sc, const struct vmbus_message *msg)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user