From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] rtnl: limit IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES to 4096 Date: Tue, 02 Oct 2018 16:09:24 -0700 (PDT) Message-ID: <20181002.160924.338801646536868786.davem@davemloft.net> References: <20181002224735.31067-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:51352 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725198AbeJCFzJ (ORCPT ); Wed, 3 Oct 2018 01:55:09 -0400 In-Reply-To: <20181002224735.31067-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Tue, 2 Oct 2018 15:47:35 -0700 > We have an impressive number of syzkaller bugs that are linked > to the fact that syzbot was able to create a networking device > with millions of TX (or RX) queues. > > Let's limit the number of RX/TX queues to 4096, this really should > cover all known cases. > > A separate patch will add various cond_resched() in the loops > handling sysfs entries at device creation and dismantle. > > Tested: > > lpaa6:~# ip link add gre-4097 numtxqueues 4097 numrxqueues 4097 type ip6gretap > RTNETLINK answers: Invalid argument > > lpaa6:~# time ip link add gre-4096 numtxqueues 4096 numrxqueues 4096 type ip6gretap > > real 0m0.180s > user 0m0.000s > sys 0m0.107s > > Fixes: 76ff5cc91935 ("rtnl: allow to specify number of rx and tx queues on device creation") > Signed-off-by: Eric Dumazet > Reported-by: syzbot Applied and queued up for -stable.