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. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev