On 3/25/21 5:16 PM, Taehee Yoo wrote:
> The ifmcaddr6 has been protected by inet6_dev->lock(rwlock) so that
> the critical section is atomic context. In order to switch this context,
> changing locking is needed. The ifmcaddr6 actually already protected by
> RTNL So if it's converted to use RCU, its control path context can be
> switched to sleepable.
>
I do not really understand the changelog.
You wanted to convert from RCU to RTNL, right ?
Also :
> @@ -571,13 +573,9 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter
> *gsf,
> if (!ipv6_addr_is_multicast(group))
> return -EINVAL;
>
> - rcu_read_lock();
> - idev = ip6_mc_find_dev_rcu(net, group, gsf->gf_interface);
> -
> - if (!idev) {
> - rcu_read_unlock();
> + idev = ip6_mc_find_dev_rtnl(net, group, gsf->gf_interface);
> + if (!idev)
> return -ENODEV;
> - }
>
I do not see RTNL being acquired before entering ip6_mc_msfget()
- [PATCH net-next v3 0/7] mld: change context from atomic to sl... Taehee Yoo
- [PATCH net-next v3 1/7] mld: convert from timer to delay... Taehee Yoo
- [PATCH net-next v3 3/7] mld: convert ipv6_mc_socklist-&g... Taehee Yoo
- [PATCH net-next v3 2/7] mld: get rid of inet6_dev->mc... Taehee Yoo
- [PATCH net-next v3 4/7] mld: convert ip6_sf_list to RCU Taehee Yoo
- [PATCH net-next v3 5/7] mld: convert ifmcaddr6 to RCU Taehee Yoo
- Re: [PATCH net-next v3 5/7] mld: convert ifmcaddr6 t... Eric Dumazet
- [PATCH net-next v3 6/7] mld: add new workqueues for proc... Taehee Yoo
- [PATCH net-next v3 7/7] mld: add mc_lock for protecting ... Taehee Yoo
- Re: [PATCH net-next v3 7/7] mld: add mc_lock for pro... Eric Dumazet
- Re: [PATCH net-next v3 7/7] mld: add mc_lock for... Eric Dumazet
- Re: [PATCH net-next v3 0/7] mld: change context from ato... Taehee Yoo
