From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net 00/13] net_sched: close the race between call_rcu() and cleanup_net() Date: Thu, 09 Nov 2017 11:26:07 +0900 (KST) Message-ID: <20171109.112607.6392736117383202.davem@davemloft.net> References: <20171106214730.24421-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, lucasb@mojatatu.com, jhs@mojatatu.com, jiri@resnulli.us To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:54994 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbdKIC0U (ORCPT ); Wed, 8 Nov 2017 21:26:20 -0500 In-Reply-To: <20171106214730.24421-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Mon, 6 Nov 2017 13:47:17 -0800 > This patchset tries to fix the race between call_rcu() and > cleanup_net() again. Without holding the netns refcnt the > tc_action_net_exit() in netns workqueue could be called before > filter destroy works in tc filter workqueue. This patchset > moves the netns refcnt from tc actions to tcf_exts, without > breaking per-netns tc actions. > > Patch 1 reverts the previous fix, patch 2 introduces two new > API's to help to address the bug and the rest patches switch > to the new API's. Please see each patch for details. > > I was not able to reproduce this bug, but now after adding > some delay in filter destroy work I manage to trigger the > crash. After this patchset, the crash is not reproducible > any more and the debugging printk's show the order is expected > too. > > Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") > Reported-by: Lucas Bates > Cc: Lucas Bates > Cc: Jamal Hadi Salim > Cc: Jiri Pirko > Signed-off-by: Cong Wang I have to say this was a lot of churn so late in the release cycle.... but I ended up pulling anyways. I cannot guarantee that I will be able to push this to Linus in time for 4.14-final. Thanks.