netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	kaber@trash.net, netdev@oss.sgi.com
Subject: Re: request_module while holding rtnl semaphore
Date: Wed, 10 Nov 2004 02:01:13 +0100	[thread overview]
Message-ID: <20041110010113.GJ31969@postel.suug.ch> (raw)
In-Reply-To: <20041109161126.376f755c.davem@davemloft.net>

* David S. Miller <20041109161126.376f755c.davem@davemloft.net> 2004-11-09 16:11
> On Sat, 06 Nov 2004 10:35:45 +1100
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > 2) Hooking random net/sched requests into rtnetlink.  By being an
> > rtnetlink user you pay the price of taking the rtnl.  Most of the
> > net/sched stuff has nothing to do with rtnetlink.
> 
> I believe this is a false statement.  Every single networking
> config change depends upon device existence and state in some
> way.  By virtue of that, they really depend upon the RTNL being
> held during the duration of their execution.
> 
> Only the actual implementations know when and where such a
> dependency on device state et al. does not exist, and therefore
> where RTNL holding is not necessary.
> 
> Therefore I suggest we just implement the fix for this inside of
> the packet scheduler layer itself.  Simply by dropping the RTNL
> semaphore during the module request, and then regrabbing the RTNL
> semaphore and replaying the request from the beginning.

Sounds reasonable for the sch_api.c and cls_api.c case but
will get very nasty for act_api as you noted and any further sub
layers that might be added in the future. (The classifier I'm
working on is such a case.)

I suggest to add TCA_PRELOAD being an array of module names to
be preloaded so userspace can tell us what modules might be
needed. Those modules would get loaded at the same spot while
rtnl semaphore is dropped. I think the fix is fine for cls/qdisc
to fix it for older iproute2 versions but it might be worth
to make the action code use it right away.

Thoughts?

  parent reply	other threads:[~2004-11-10  1:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-04  3:11 request_module while holding rtnl semaphore Patrick McHardy
2004-11-05 23:35 ` Herbert Xu
2004-11-10  0:11   ` David S. Miller
2004-11-10  0:38     ` Patrick McHardy
2004-11-10  1:01     ` Thomas Graf [this message]
2004-11-10  1:10       ` Patrick McHardy
2004-11-10  1:22         ` Thomas Graf
2004-11-10  1:29           ` Patrick McHardy
2004-11-10  1:39             ` Thomas Graf
2004-11-10  1:41               ` Herbert Xu
2004-11-10 11:32                 ` Thomas Graf
2004-11-10 11:42                   ` Herbert Xu
2004-11-10 11:56                     ` Thomas Graf
2004-11-10  1:47               ` Patrick McHardy
2004-12-12 17:57                 ` Thomas Graf
2004-12-12 18:04                   ` Patrick McHardy
2004-12-13 16:53                     ` [RFC] tcf_bind_filter failure handling Thomas Graf
2004-12-13 18:11                       ` Patrick McHardy
2004-12-13 18:52                         ` Thomas Graf
2004-12-13 19:12                           ` Patrick McHardy
2004-12-13 19:23                           ` jamal
2004-12-13 19:32                             ` Thomas Graf
2004-11-10  1:15     ` request_module while holding rtnl semaphore Herbert Xu
2005-01-11  3:04     ` Patrick McHardy
2005-01-11  9:47       ` Thomas Graf
2005-01-11 21:05         ` Patrick McHardy
2005-01-11 21:47           ` Thomas Graf
2005-01-11 21:50             ` Thomas Graf
2005-01-11 22:18               ` Patrick McHardy

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=20041110010113.GJ31969@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=netdev@oss.sgi.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).