From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net-next] net_sched: call qdisc_reset() with qdisc lock Date: Tue, 02 Jan 2018 11:39:13 -0500 (EST) Message-ID: <20180102.113913.967587708347955804.davem@davemloft.net> References: <20171222000330.29009-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, jakub.kicinski@netronome.com, john.fastabend@gmail.com To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:49522 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbeABQjP (ORCPT ); Tue, 2 Jan 2018 11:39:15 -0500 In-Reply-To: <20171222000330.29009-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Thu, 21 Dec 2017 16:03:29 -0800 > qdisc_reset() should always be called with qdisc spinlock > and with BH disabled, otherwise qdisc ->reset() could race > with TX BH. > > Fixes: 7bbde83b1860 ("net: sched: drop qdisc_reset from dev_graft_qdisc") > Reported-by: Jakub Kicinski > Cc: John Fastabend > Signed-off-by: Cong Wang There doesn't seem to be agreement over whether qdisc_reset() really needs to run with the lock held. In fact, the general consensus is that this really shouldn't run until a grace period had occurred and therefore parallel TX paths cannot be running any longer. In any event, this was supposed to work towards a bug fix which ultimately was fixed instead with the ptr_ring change from John. So this seems unnecessary now. If you disagree, please repost with an updated commit message which explains things further. Thank you.