Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-22 Thread David Miller
From: Eric Dumazet Date: Tue, 20 Mar 2018 10:20:15 -0700 > > > On 03/20/2018 10:11 AM, David Lebrun wrote: >> On 20/03/18 15:07, Eric Dumazet wrote: >>> This is not the proper fix. >>> >>> Control path holds RTNL and can sleeep if needed. >>> >>> RCU should be avoided

Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-20 Thread Eric Dumazet
On 03/20/2018 10:11 AM, David Lebrun wrote: > On 20/03/18 15:07, Eric Dumazet wrote: >> This is not the proper fix. >> >> Control path holds RTNL and can sleeep if needed. >> >> RCU should be avoided in lwtunnel_build_state() >> > > +Roopa > > In lwtunnel_build_state(), the RCU protects the

Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-20 Thread David Lebrun
On 20/03/18 15:07, Eric Dumazet wrote: This is not the proper fix. Control path holds RTNL and can sleeep if needed. RCU should be avoided in lwtunnel_build_state() +Roopa In lwtunnel_build_state(), the RCU protects the lwtunnel_encap_ops "ops" which is rcu-dereferenced. Moreover, the

Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-20 Thread Eric Dumazet
On 03/20/2018 07:44 AM, David Lebrun wrote: > From: David Lebrun > > The seg6_build_state() function is called with RCU read lock held, > so we cannot use GFP_KERNEL. This patch uses GFP_ATOMIC instead. > > > Fixes: 6c8702c60b886 ("ipv6: sr: add support for SRH

[PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-20 Thread David Lebrun
From: David Lebrun The seg6_build_state() function is called with RCU read lock held, so we cannot use GFP_KERNEL. This patch uses GFP_ATOMIC instead. [ 92.770271] = [ 92.770628] WARNING: suspicious RCU usage [ 92.770921] 4.16.0-rc4+ #12 Not