From: Stephen Hemminger <stephen@networkplumber.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Cong Wang <cwang@twopensource.com>
Subject: Re: [Patch net] rtnetlink: call rtnl_lock_unregistering() in rtnl_link_unregister()
Date: Fri, 9 May 2014 12:02:41 -0700 [thread overview]
Message-ID: <20140509120241.3b628dc1@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAM_iQpUJ7q_RgFzJ7yu5F0aYSSCVAEu64UpwN=md0OyRGHBFAg@mail.gmail.com>
On Fri, 9 May 2014 11:10:36 -0700
Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Fri, May 9, 2014 at 11:03 AM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> > On Fri, 9 May 2014 10:47:33 -0700
> > Cong Wang <xiyou.wangcong@gmail.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.
next prev parent reply other threads:[~2014-05-09 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 17:47 [Patch net] rtnetlink: call rtnl_lock_unregistering() in rtnl_link_unregister() Cong Wang
2014-05-09 18:03 ` Stephen Hemminger
2014-05-09 18:10 ` Cong Wang
2014-05-09 19:02 ` Stephen Hemminger [this message]
2014-05-09 19:22 ` Cong Wang
2014-05-09 23:05 ` Eric W. Biederman
2014-05-12 5:17 ` Cong Wang
2014-05-12 9:18 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140509120241.3b628dc1@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).