From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [Patch net-next v3] net_sched: change tcf_del_walker() to take idrinfo->lock Date: Fri, 28 Sep 2018 21:47:36 -0700 Message-ID: References: <20180919233729.10951-1-xiyou.wangcong@gmail.com> <20180928145900.GA17640@splinter> <20180928181114.GA28797@splinter> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Jiri Pirko , Jamal Hadi Salim , Vlad Buslov To: Ido Schimmel Return-path: Received: from mail-pf1-f180.google.com ([209.85.210.180]:36911 "EHLO mail-pf1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbeI2LBW (ORCPT ); Sat, 29 Sep 2018 07:01:22 -0400 Received: by mail-pf1-f180.google.com with SMTP id x26-v6so5595278pfn.4 for ; Fri, 28 Sep 2018 21:34:29 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Sep 28, 2018 at 11:29 AM Cong Wang wrote: > > On Fri, Sep 28, 2018 at 11:11 AM Ido Schimmel wrote: > > I don't think this will work given the reference count already dropped > > to 0, which is why the template deletion function was invoked. I didn't > > test the patch, but I don't see what would prevent the chain from being > > freed. > > Good catch! So I should just "move" tcf_chain_destroy() into cls_flower. > > A patch is being compiled now. Just FYI, the crash is fixed, but another RCU warning pops up after my fix. So I am still debugging it, it is related to the kfree_rcu() in tcf_chain_destroy().