From mboxrd@z Thu Jan 1 00:00:00 1970 From: yao zhao Subject: Re: [rfc] IPVS: convert scheduler management to RCU Date: Fri, 20 Aug 2010 13:54:11 -0400 Message-ID: References: <20100820133320.GA29311@verge.net.au> <1282313150.2484.65.camel@edumazet-laptop> <1282314765.2484.104.camel@edumazet-laptop> <1282318337.2484.219.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Changli Gao , Simon Horman , lvs-devel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Stephen Hemminger , Wensong Zhang , Julian Anastasov , Paul E McKenney To: Eric Dumazet Return-path: In-Reply-To: <1282318337.2484.219.camel@edumazet-laptop> Sender: lvs-devel-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org On Fri, Aug 20, 2010 at 11:32 AM, Eric Dumazet = wrote: > Le vendredi 20 ao=FBt 2010 =E0 11:04 -0400, yao zhao a =E9crit : > >> The code here is deleting a global from the list, am I right? I didn= 't >> see any called case. >> what are you going to do more? free it? write_unlock_bh should make = the mb. > > > If you dont wait _after_ delete from list and following actions > (kfree() without a call_rcu(), or module unload, or whatever), a read= er > might access your data/code and crash the box. > > spin_unlock_bh() wont help you at all, since only writers are freezed= by > the lock (since readers only hold rcu_lock) > > Documentation/RCU/whatisRCU.txt line 705 > > Documentation/RCU/checklist.txt =A015) > > > > I read the code again and that global is in a module then you are right= =2E If that global is not in a module then you don't need it at all, as in that global only functions pointer or name... which never be changed. yao