[ovs-dev] [PATCH 4/9] datapath-windows: Fix bugs in Event.c around subscribe and lock

Alin Serdean aserdean at cloudbasesolutions.com
Sat Jul 23 01:28:17 UTC 2016



> -----Mesaj original-----
> De la: Sairam Venugopal [mailto:vsairam at vmware.com]
> Trimis: Thursday, July 21, 2016 9:52 PM
> Către: Alin Serdean <aserdean at cloudbasesolutions.com>; Yin Lin
> <yinlin10 at gmail.com>
> Cc: dev at openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH 4/9] datapath-windows: Fix bugs in Event.c
> around subscribe and lock
> 
> Hi Alin,
> 
> gOvsSwitchContext->dpNo and gOvsSwitchContext in general is currently
> gOvsSwitchContext->read
> in a lot of places without any locks being taken out.
[Alin Gabriel Serdean: ] which ones?
> 
> Eg: -
> https://github.com/openvswitch/ovs/blob/15850211ce88d540e57a6f2fc8096
> 3465b9
> a5475/datapath-windows/ovsext/Datapath.c#L973
> https://github.com/openvswitch/ovs/blob/15850211ce88d540e57a6f2fc8096
> 3465b9
> a5475/datapath-windows/ovsext/Datapath.c#L1420
[Alin Gabriel Serdean: ] Those are guarded by reference counting (OvsAcquireSwitchContext/OvsReleaseSwitchContext)
> 
> The function OvsGetOpenInstance() is currently defined in Datapath.c and
> only used by 2 methods in Event.c. If gOvsSwitchContext->dpNo was meant
> to be read after acquiring a lock,  then we need to define a lock specific to
> gOvsSwitchContext inside OvsGetOpenInstance() and not rely on
> EventQueue lock to enforce it.
> 
> Thanks,
> Sairam
> 
> 
> 
> 
> On 7/21/16, 6:58 AM, "Alin Serdean" <aserdean at cloudbasesolutions.com>
> wrote:
> 
> >> -----Mesaj original-----
> >
> >> De la: dev [mailto:dev-bounces at openvswitch.org] În numele Sairam
> >
> >> Venugopal
> >
> >> Trimis: Monday, July 18, 2016 9:27 PM
> >
> >> Către: Yin Lin <yinlin10 at gmail.com>
> >
> >> Cc: dev at openvswitch.org
> >
> >> Subiect: Re: [ovs-dev] [PATCH 4/9] datapath-windows: Fix bugs in
> >> Event.c
> >
> >> around subscribe and lock
> >
> >>
> >
> >> Hi Yin,
> >
> >>
> >
> >> Thanks for reviewing this. (1) has been addressed in a different patch.
> >
> >> (2) We don¹t need the lock for OvsGetOpenInstance().
> >
> >[Alin Gabriel Serdean: ] we need a lock in OvsGetOpenInstance because:
> >
> >https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_openvsw
> >itc
> >h_ovs_blob_master_datapath-2Dwindows_ovsext_Datapath.c-
> 23L527&d=CwIGaQ&
> >c=S
> >qcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-
> uEs&r=Dcruz40PROJ40ROzSpxyQSLw6f
> >crO
> >WpJgEcEmNR3JEQ&m=TIfmnsdkLsgajJWRZp6fyWcW_1eXVWsfuqHqHzvVhi
> M&s=Lb5uwUve
> >kGK
> >ck_ubpcUaZVZkJMFEEgaBwQtbZVsD8vw&e=
> >
> >
> >
> >gOvsSwitchContext->dpNo



More information about the dev mailing list