Subject: Re: request_module while holding rtnl semaphore

From: Thomas Graf <[email-masked]>
Date: Tue, 11 Jan 2005 10:47:52 +0100

* Patrick McHardy <[email-masked]> 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.