[ovs-dev] [PATCH] lib/ovs-thread: make use of the pthread_attr object

Andy Zhou azhou at ovn.org
Thu Mar 10 22:37:15 UTC 2016


On Thu, Mar 10, 2016 at 2:30 PM, Ben Pfaff <blp at ovn.org> wrote:

> Andy, can you transform the reference into a Fixes: tag?
>
Good point. Will do.

>
> Thanks,
>
> Ben.
>
> On Thu, Mar 10, 2016 at 02:14:03PM -0800, Andy Zhou wrote:
> > LGTM,   Acked-by: Andy Zhou <azhou at ovn.org>
> >
> > I will push it later today. Thanks.
> >
> > On Thu, Mar 10, 2016 at 8:37 AM, Alexandru Ardelean <
> ardeleanalex at gmail.com>
> > wrote:
> >
> > > Referencing this commit:
> > >    8147cec9ee8feea9440cf79365709ddc32ff57d5
> > >
> > > My bad for not noticing this earlier.
> > > I only got to try the OVS upstream patch just now and noticed this.
> > > We're still using an older version of OVS internally, so this slipped
> by.
> > >
> > > I was wondering why the crash was still occuring and checked the patch.
> > >
> > > The pthread_attr object needs to be passed to the pthread_create()
> > > call in order to make use of it.
> > >
> > > Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
> > > ---
> > >  lib/ovs-thread.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c
> > > index b0e10ee..bffdd96 100644
> > > --- a/lib/ovs-thread.c
> > > +++ b/lib/ovs-thread.c
> > > @@ -386,7 +386,7 @@ ovs_thread_create(const char *name, void
> > > *(*start)(void *), void *arg)
> > >      pthread_attr_init(&attr);
> > >      set_min_stack_size(&attr, 512 * 1024);
> > >
> > > -    error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
> > > +    error = pthread_create(&thread, &attr, ovsthread_wrapper, aux);
> > >      if (error) {
> > >          ovs_abort(error, "pthread_create failed");
> > >      }
> > > --
> > > 1.7.10.4
> > >
> > > _______________________________________________
> > > dev mailing list
> > > dev at openvswitch.org
> > > http://openvswitch.org/mailman/listinfo/dev
> > >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list