On Tue, Dec 4, 2012 at 12:21 AM, Jesse Gross <je...@nicira.com> wrote:

> On Thu, Nov 22, 2012 at 7:56 AM, Pravin B Shelar <pshe...@nicira.com>
> wrote:
> > diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
> > index 162464f..b76c151 100644
> > --- a/drivers/net/ppp/pptp.c
> > +++ b/drivers/net/ppp/pptp.c
> > @@ -673,11 +673,14 @@ static int __init pptp_init_module(void)
> >         if (!callid_sock)
> >                 return -ENOMEM;
> >
> > +       rtnl_lock();
> >         err = gre_add_protocol(&gre_pptp_protocol, GREPROTO_PPTP);
> >         if (err) {
> > +               rtnl_unlock();
> >                 pr_err("PPTP: can't add gre protocol\n");
> >                 goto out_mem_free;
> >         }
> > +       rtnl_unlock();
>
> Can we simplify this (and ip_gre.c) a little bit by releasing the lock
> immediately after gre_add_protocol()?  That way there would be only
> one path to unlock and it's less likely that future changes will
> introduce problems.
>

ok, I will update patch.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to