From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net: sched: red: avoid hashing NULL child Date: Fri, 18 May 2018 13:53:12 -0400 (EDT) Message-ID: <20180518.135312.896740897180570132.davem@davemloft.net> References: <286744ab66eaa07d61d5d8ce8a07cb0b1615d35c.1526647813.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, liuhangbin@gmail.com, jkosina@suse.cz To: pabeni@redhat.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:48198 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbeERRxO (ORCPT ); Fri, 18 May 2018 13:53:14 -0400 In-Reply-To: <286744ab66eaa07d61d5d8ce8a07cb0b1615d35c.1526647813.git.pabeni@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Paolo Abeni Date: Fri, 18 May 2018 14:51:44 +0200 > Hangbin reported an Oops triggered by the syzkaller qdisc rules: ... > When a red qdisc is updated with a 0 limit, the child qdisc is left > unmodified, no additional scheduler is created in red_change(), > the 'child' local variable is rightfully NULL and must not add it > to the hash table. > > This change addresses the above issue moving qdisc_hash_add() right > after the child qdisc creation. It additionally removes unneeded checks > for noop_qdisc. > > Reported-by: Hangbin Liu > Fixes: 49b499718fa1 ("net: sched: make default fifo qdiscs appear in the dump") > Signed-off-by: Paolo Abeni Applied and queued up for -stable, thanks Paolo.