VirtualBox

Changeset 56589 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 22, 2015 9:15:52 PM (9 years ago)
Author:
vboxsync
Message:

Network/NetLwf: listModules access and modification fixes (#7231)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp

    r56485 r56589  
    802802    pModuleCtx->hFilter   = hFilter;
    803803    vboxNetLwfWinChangeState(pModuleCtx, LwfState_Attaching);
    804     /* Insert into module chain */
    805     NdisAcquireSpinLock(&pGlobals->Lock);
    806     RTListPrepend(&pGlobals->listModules, &pModuleCtx->node);
    807     NdisReleaseSpinLock(&pGlobals->Lock);
    808804    /* Initialize transmission mutex and events */
    809805    NDIS_INIT_MUTEX(&pModuleCtx->InTransmit);
     
    855851        return NDIS_STATUS_RESOURCES;
    856852    }
     853    /* Insert into module chain */
     854    NdisAcquireSpinLock(&pGlobals->Lock);
     855    RTListPrepend(&pGlobals->listModules, &pModuleCtx->node);
     856    NdisReleaseSpinLock(&pGlobals->Lock);
    857857
    858858    vboxNetLwfWinChangeState(pModuleCtx, LwfState_Paused);
     
    23332333    RtlInitAnsiString(&strInst, pThis->szName);
    23342334    PVBOXNETLWF_MODULE pModuleCtx = NULL;
     2335    NdisAcquireSpinLock(&g_VBoxNetLwfGlobals.Lock);
    23352336    RTListForEach(&g_VBoxNetLwfGlobals.listModules, pModuleCtx, VBOXNETLWF_MODULE, node)
    23362337    {
     
    23382339        if (RtlEqualString(&strInst, &pModuleCtx->strMiniportName, TRUE))
    23392340        {
     2341            NdisReleaseSpinLock(&g_VBoxNetLwfGlobals.Lock);
    23402342            Log(("vboxNetFltOsInitInstance: found matching module, name=%s\n", pThis->szName));
    23412343            pThis->u.s.WinIf.hModuleCtx = pModuleCtx;
     
    23472349        }
    23482350    }
     2351    NdisReleaseSpinLock(&g_VBoxNetLwfGlobals.Lock);
    23492352    LogFlow(("<==vboxNetFltOsInitInstance: return VERR_INTNET_FLT_IF_NOT_FOUND\n"));
    23502353    return VERR_INTNET_FLT_IF_NOT_FOUND;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette