summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2021-03-25 19:16:53 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-27 01:14:56 +0300
commit882ba1f73c06831f2a21044ebd8864c485ac04f2 (patch)
treed00be735539c1134fa1abfefd92f1c4a99dcd746 /include
parentcf2ce339b401bc53ee131f0ce38bae32a949925e (diff)
downloadlinux-882ba1f73c06831f2a21044ebd8864c485ac04f2.tar.xz
mld: convert ipv6_mc_socklist->sflist to RCU
The sflist has been protected by rwlock so that the critical section is atomic context. In order to switch this context, changing locking is needed. The sflist actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. 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>
Diffstat (limited to 'include')
-rw-r--r--include/net/if_inet6.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 1080d2248304..062294aeeb6d 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -78,6 +78,7 @@ struct inet6_ifaddr {
struct ip6_sf_socklist {
unsigned int sl_max;
unsigned int sl_count;
+ struct rcu_head rcu;
struct in6_addr sl_addr[];
};
@@ -91,8 +92,7 @@ struct ipv6_mc_socklist {
int ifindex;
unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
struct ipv6_mc_socklist __rcu *next;
- rwlock_t sflock;
- struct ip6_sf_socklist *sflist;
+ struct ip6_sf_socklist __rcu *sflist;
struct rcu_head rcu;
};