[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CANP3RGfCk2PtUxEY+oNkMGcTnj=+y++edVyf0S6y5Qo4Z41MwQ@mail.gmail.com>
Date: Sun, 22 Mar 2015 01:20:11 -0700
From: Maciej Żenczykowski <maze@...gle.com>
To: Mahesh Bandewar <maheshb@...gle.com>
Cc: David Miller <davem@...emloft.net>,
Veaceslav Falico <vfalico@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
Nikolay Aleksandrov <nikolay@...hat.com>,
Jay Vosburgh <j.vosburgh@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 0/4] bonding work-queues, try_rtnl() & notifications
> One major hurdle as I see in this approach is that if a module uses this and
> gets unloaded before the next rtnl-unlock call, it would face catastrophic
> consequences. However it can be avoided but there will be cost to manipulate
> that while the gains are not that great.
One very dirty solution would be to always build the couple functions
that need to be called like this into the kernel proper...
But on second thought I actually don't see the problem - functions get
called *before* mutex is released.
All you need to do is rtnl_lock/unlock post deregistration (of any
code that could add callbacks) in the module exit code. Since you've
already deregistered no-one will add a new callback to the queue, and
since you grab/release the rtnl lock you flush the queue, and you're
clear.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists