LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [rfc] IPVS: convert scheduler management to RCU

To: yao zhao <dragonlinux@xxxxxxxxx>
Subject: Re: [rfc] IPVS: convert scheduler management to RCU
Cc: Changli Gao <xiaosuo@xxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, Stephen Hemminger <shemminger@xxxxxxxxxx>, Wensong Zhang <wensong@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Paul E McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Fri, 20 Aug 2010 17:32:17 +0200
Le vendredi 20 août 2010 à 11:04 -0400, yao zhao a écrit :

> 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 reader
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  15)



--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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