From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net] net_sched: fix a missing rcu barrier in mini_qdisc_pair_swap() Date: Tue, 26 Dec 2017 12:30:21 -0500 (EST) Message-ID: <20171226.123021.1477766854322698861.davem@davemloft.net> References: <20171221072624.6204-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, jiri@mellanox.com, john.fastabend@gmail.com To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:55510 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbdLZRaX (ORCPT ); Tue, 26 Dec 2017 12:30:23 -0500 In-Reply-To: <20171221072624.6204-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Wed, 20 Dec 2017 23:26:24 -0800 > The rcu_barrier_bh() in mini_qdisc_pair_swap() is to wait for > flying RCU callback installed by a previous mini_qdisc_pair_swap(), > however we miss it on the tp_head==NULL path, which leads to that > the RCU callback still uses miniq_old->rcu after it is freed together > with qdisc in qdisc_graft(). So just add it on that path too. > > Fixes: 46209401f8f6 ("net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath ") > Reported-by: Jakub Kicinski > Tested-by: Jakub Kicinski > Cc: Jiri Pirko > Cc: John Fastabend > Signed-off-by: Cong Wang Applied.