mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 16:48:38 -04:00
mld: convert ip6_sf_list to RCU
The ip6_sf_list has been protected by mca_lock(spin_lock) so that the critical section is atomic context. In order to switch this context, changing locking is needed. The ip6_sf_list actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. But It doesn't remove mca_lock yet because ifmcaddr6 isn't converted to RCU yet. So, It's not fully converted to the sleepable context. Suggested-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
882ba1f73c
commit
4b200e3989
@@ -97,12 +97,13 @@ struct ipv6_mc_socklist {
|
||||
};
|
||||
|
||||
struct ip6_sf_list {
|
||||
struct ip6_sf_list *sf_next;
|
||||
struct ip6_sf_list __rcu *sf_next;
|
||||
struct in6_addr sf_addr;
|
||||
unsigned long sf_count[2]; /* include/exclude counts */
|
||||
unsigned char sf_gsresp; /* include in g & s response? */
|
||||
unsigned char sf_oldin; /* change state */
|
||||
unsigned char sf_crcount; /* retrans. left to send */
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
#define MAF_TIMER_RUNNING 0x01
|
||||
@@ -115,8 +116,8 @@ struct ifmcaddr6 {
|
||||
struct in6_addr mca_addr;
|
||||
struct inet6_dev *idev;
|
||||
struct ifmcaddr6 *next;
|
||||
struct ip6_sf_list *mca_sources;
|
||||
struct ip6_sf_list *mca_tomb;
|
||||
struct ip6_sf_list __rcu *mca_sources;
|
||||
struct ip6_sf_list __rcu *mca_tomb;
|
||||
unsigned int mca_sfmode;
|
||||
unsigned char mca_crcount;
|
||||
unsigned long mca_sfcount[2];
|
||||
|
||||
Reference in New Issue
Block a user