[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140509120241.3b628dc1@nehalam.linuxnetplumber.net>
Date: Fri, 9 May 2014 12:02:41 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Cong Wang <cwang@...pensource.com>
Subject: Re: [Patch net] rtnetlink: call rtnl_lock_unregistering() in
rtnl_link_unregister()
On Fri, 9 May 2014 11:10:36 -0700
Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Fri, May 9, 2014 at 11:03 AM, Stephen Hemminger
> <stephen@...workplumber.org> wrote:
> > On Fri, 9 May 2014 10:47:33 -0700
> > Cong Wang <xiyou.wangcong@...il.com> wrote:
> >
> >> I know making rtnl_lock_unregistering() a macro is ugly, but I don't find
> >> any less ugly way to fix it unless we duplicate the code. For long term,
> >> I think we should clean up the mess of netdev_run_todo() and net namespce
> >> exit code.
> >
> > Huh, why isn't a real function going to work.
>
> Because in its callers:
>
> + rtnl_lock_unregistering(net_list, exit_list);
> + rtnl_lock_unregistering(&net_namespace_list, list);
>
> struct net is linked via ->exit_list in net_list and is linked
> via ->list in net_namespace_list.
>
> This can't be done without a macro (at least for me). Or
> we have to duplicate the code.
macro method is too ugly, figure out a better way.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists