From: Jamal Hadi Salim Subject: Re: [Patch net 00/16] net_sched: fix races with RCU callbacks Date: Tue, 31 Oct 2017 07:00:22 -0400 Message-ID: <0dfff609-d67e-0701-399f-1dbe2ef09bf3@mojatatu.com> References: <20171027012443.3306-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Linux Kernel Network Developers , Chris Mi , Daniel Borkmann , Jiri Pirko , John Fastabend , "Paul E. McKenney" To: Cong Wang , Lucas Bates Return-path: Received: from mail-io0-f195.google.com ([209.85.223.195]:55180 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdJaLAZ (ORCPT ); Tue, 31 Oct 2017 07:00:25 -0400 Received: by mail-io0-f195.google.com with SMTP id e89so34040174ioi.11 for ; Tue, 31 Oct 2017 04:00:24 -0700 (PDT) In-Reply-To: Content-Language: en-GB Sender: netdev-owner@vger.kernel.org List-ID: On 17-10-31 01:44 AM, Cong Wang wrote: > On Mon, Oct 30, 2017 at 6:03 PM, Lucas Bates wrote: >> On Oct 30, 2017 19:13, "Cong Wang" wrote: >>> > Can you try this patch? From your stack trace it is not clear where > the cause is, but we know that the crash is in __tcf_idr_release(), > this is how I came up with the following patch: > > > diff --git a/include/net/act_api.h b/include/net/act_api.h > index b944e0eb93be..5072446d5f06 100644 > --- a/include/net/act_api.h > +++ b/include/net/act_api.h > @@ -122,7 +122,9 @@ void tcf_idrinfo_destroy(const struct tc_action_ops *ops, > > static inline void tc_action_net_exit(struct tc_action_net *tn) > { > + rtnl_lock(); > tcf_idrinfo_destroy(tn->ops, tn->idrinfo); > + rtnl_unlock(); > kfree(tn->idrinfo); > } > > Looks like an excellent bet;-> tdc kills the container at the end of the test. cheers, jamal