Hi All This is my first attempt to add RCU synchronization to pieces of SCTP and I want to make sure I do this right.
The RCU docs a somewhat outdated, and the calling conventions differ between subsystems, so I am using what I've been able to find. A bit of a background... The whole problem started with a panic that led me to NULL deref while walking a global list of addresses that SCTP maitains. That list is modified curing the NETDEV_UP and NETDEV_DOWN notifier processing and all readers are run in user context. It looks like the list was modified while a user app was walking it and we crashed. Easy enough to fix by adding locking. However, some notifiers (ipv6 addrconf) run in atomic context and it says that they can't sleep. (Q1. Why are ipv6 notifiers atomic, while IPv4 notifires are blocking?) So, I decided to add RCU locking around that list. These events are already synchronized, so no additional locking on the writer side are need, so should be make for a nice RCU conversion. While doing this conversion, I saw that the same structures are used to maintain a list of bound addresses. This seemed like another opportunity to use RCU. In this case, the readers are wide spread, but there are only 2 wirters: BH processing of specific chunks, and bind() calls. Again the writers are already synchronized on the socket lock, so they will keep out of each others way. Readers are widespread, but rcu takes care of that nicely. So, can folks please take a look and make sure I didn't mess up the rcu conventions. Thanks a lot -vlad - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html