From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Graf Subject: Re: request_module while holding rtnl semaphore Date: Tue, 11 Jan 2005 10:47:52 +0100 Message-ID: <20050111094752.GD26856@postel.suug.ch> References: <41899DCF.3050804@trash.net> <20041109161126.376f755c.davem@davemloft.net> <41E34252.504@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Herbert Xu , netdev@oss.sgi.com Return-path: To: Patrick McHardy Content-Disposition: inline In-Reply-To: <41E34252.504@trash.net> Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org * Patrick McHardy <41E34252.504@trash.net> 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.