From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [Patch net] net_sched: fix a missing rcu barrier in mini_qdisc_pair_swap() Date: Fri, 22 Dec 2017 11:24:24 +0100 Message-ID: <20171222102424.GE11519@nanopsycho> References: <20171221072624.6204-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Jiri Pirko , John Fastabend To: Cong Wang Return-path: Received: from mail-wr0-f181.google.com ([209.85.128.181]:34286 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752465AbdLVKY0 (ORCPT ); Fri, 22 Dec 2017 05:24:26 -0500 Received: by mail-wr0-f181.google.com with SMTP id y21so27521691wrc.1 for ; Fri, 22 Dec 2017 02:24:25 -0800 (PST) Content-Disposition: inline In-Reply-To: <20171221072624.6204-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Thu, Dec 21, 2017 at 08:26:24AM CET, xiyou.wangcong@gmail.com wrote: >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 Acked-by: Jiri Pirko