From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f170.google.com ([209.85.128.170]:45882 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeCTRLV (ORCPT ); Tue, 20 Mar 2018 13:11:21 -0400 Received: by mail-wr0-f170.google.com with SMTP id h2so2478246wre.12 for ; Tue, 20 Mar 2018 10:11:21 -0700 (PDT) Subject: Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state To: Eric Dumazet , netdev@vger.kernel.org Cc: David Lebrun , Roopa Prabhu References: <20180320144456.223556-1-dav.lebrun@gmail.com> From: David Lebrun Message-ID: Date: Tue, 20 Mar 2018 17:11:19 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: 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 lwtunnel_state_alloc() function, which is used in all build_state functions, also uses GFP_ATOMIC, so this seemed a proper fix, or at least proper mitigation. Do you suggest that the lwtunnel_encap_ops can be protected in a different way, not requiring RCU ?