netdev
[Top] [All Lists]

Re: request_module while holding rtnl semaphore

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: request_module while holding rtnl semaphore
From: Thomas Graf <tgraf@xxxxxxx>
Date: Tue, 11 Jan 2005 10:47:52 +0100
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <41E34252.504@trash.net>
References: <41899DCF.3050804@trash.net> <E1CQDcP-0003ff-00@gondolin.me.apana.org.au> <20041109161126.376f755c.davem@davemloft.net> <41E34252.504@trash.net>
Sender: netdev-bounce@xxxxxxxxxxx
* Patrick McHardy <41E34252.504@xxxxxxxxx> 2005-01-11 04:04
> David S. Miller wrote:
> 
> >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.
> >
> >The net/sched/sch_api.c version of the fix would look like the
> >following.  The act_api.c case would require a bit more surgery,
> >but with the right restructuring it can be done too.
> > 
> >
> This patch got lost somehow. The act_api.c changes are actually
> even more complicated because besides the action init path, changes
> can also be made from classifiers in a deep call-chain. I hope
> Thomas's recent changes make it easier to fix this, but I think
> this patch should go in now anyway.

The action initialization is now done first and no classifier
data is changed except for tp->root modifications which must not
be undone so you can safely return EBUSY. rsvp might be an exception,
I haven't looked too closely into it yet.

tcindex returns EBUSY when a filter is changed which does not fit
into the hashtable, so this must be changed.

<Prev in Thread] Current Thread [Next in Thread>