Skip to content

Commit 4b200e3

Browse files
TaeheeYoodavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 882ba1f commit 4b200e3

File tree

2 files changed

+130
-77
lines changed

2 files changed

+130
-77
lines changed

include/net/if_inet6.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ struct ipv6_mc_socklist {
9797
};
9898

9999
struct ip6_sf_list {
100-
struct ip6_sf_list *sf_next;
100+
struct ip6_sf_list __rcu *sf_next;
101101
struct in6_addr sf_addr;
102102
unsigned long sf_count[2]; /* include/exclude counts */
103103
unsigned char sf_gsresp; /* include in g & s response? */
104104
unsigned char sf_oldin; /* change state */
105105
unsigned char sf_crcount; /* retrans. left to send */
106+
struct rcu_head rcu;
106107
};
107108

108109
#define MAF_TIMER_RUNNING 0x01
@@ -115,8 +116,8 @@ struct ifmcaddr6 {
115116
struct in6_addr mca_addr;
116117
struct inet6_dev *idev;
117118
struct ifmcaddr6 *next;
118-
struct ip6_sf_list *mca_sources;
119-
struct ip6_sf_list *mca_tomb;
119+
struct ip6_sf_list __rcu *mca_sources;
120+
struct ip6_sf_list __rcu *mca_tomb;
120121
unsigned int mca_sfmode;
121122
unsigned char mca_crcount;
122123
unsigned long mca_sfcount[2];

0 commit comments

Comments
 (0)