[ovs-dev] [PATCH] stp: Add more logging points for debug.
Alex Wang
alexw at nicira.com
Tue Jul 22 23:54:59 UTC 2014
>
> This is not safe against simultaneous calls for the same port, but it
> would be if the assignment to 'old' happened with the lock held:
> > +void
> > +stp_port_set_name(struct stp_port *p, const char *name)
> > +{
> > + char *old = p->port_name;
> > +
> > + ovs_mutex_lock(&mutex);
> > + p->port_name = xstrdup(name);
> > + free(old);
> > + ovs_mutex_unlock(&mutex);
> > +}
>
> Acked-by: Ben Pfaff <blp at nicira.com>
>
Thanks a lot for pointing this out!
Applied to master,~
More information about the dev
mailing list