From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B4B7361965 for ; Sat, 1 Aug 2026 16:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785601677; cv=none; b=H2AnAvqTUc4gPSFwQx0oatT8wk1km9H+EP8j9vpQPw4jn1bfOKv9fJE9kcppkuHeIeR0OiVzLHqysFiObrISjaN9HJQAl7QoCMU6rsILL2rX7asQ+8DhyfTqKCz41cl8cgqp/SGCyzQE7xFfHx+rDccMa/g58cwd+Z2CsVyTR3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785601677; c=relaxed/simple; bh=N4jwfZtGyKvIYXLG6f2s6xYg8+MeESB7wKlX2azzSno=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XWo2v43RhKyyirS3HH8SnhYpHAjlYmUb0qNAEEzmzfjBCmHutNj//KSoL5QQpokKzJUTe984AvXO8R315nz83Lmlzw2pY0oYTMBhGpEfMQzHHBMmhnVskF/E5VHsYbffAFI2GeZQdKwFqYxQcLuHd0pchrdTTVn8AfUnURdIH+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com; spf=none smtp.mailfrom=mojatatu.com; dkim=pass (1024-bit key) header.d=mojatatu.com header.i=@mojatatu.com header.b=BULtA/nj; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mojatatu.com header.i=@mojatatu.com header.b="BULtA/nj" Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-c9cf07d2df6so1505772a12.2 for ; Sat, 01 Aug 2026 09:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu.com; s=google; t=1785601675; x=1786206475; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zZYiUKxvF9GtOjEd/h2m4MxUMezPtkYsLarGGm+pGsA=; b=BULtA/nj+l2BFZTAqutuDaSL/rd4a1mDX2jdKApM+JfQVGEjuBV6Ng1nAFQxWeNLq6 Zdc0OsGFn0MfaOCwhjv8gmftsi6CXhmXKAG9HP3GKWGgRfbF8MO1me24oSXEWkVFYwbj eRkKrH//3oPtjq698BZ2ykBQDN5bbEp+NLRbY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785601675; x=1786206475; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=zZYiUKxvF9GtOjEd/h2m4MxUMezPtkYsLarGGm+pGsA=; b=YXqsCf4tf5VufsotCElCuToSGO668R/GdNJCdst1104XDGpgJTBRdpC22V+GfdRvt6 biAqbDkPb0fYwL+3e3ZiQkDQX/4PODr0IOjwIUZFbSbDzKyXILUaG3r082xNhcHlbTOA 5IkgDo7Nf52wBOgTXPTY7EJHyYHH4bZgT5EdA7v7YZD+BH9gDJkAbNx6beuGEVhG13f4 SVedqzDTZ8T73U0j6qrDEMCqWg10fc0cd/cXeE8TSeEZCXApUSQhrBr2XpkkPHcnnp+p IaPzQmpnX4T4YiYSea5B9dAqSRPzakn3DiD5IncU/ycqa51AbII3VVCjX8H7K22rWWSz W4YA== X-Forwarded-Encrypted: i=1; AHgh+RpCEgX03HYjk7QDHc4lYoob902qZy2Ui58ax/QY3uyjVwqujTxHLMFyNLMPkcZtVERua6Kt5Rznud1nrvs=@vger.kernel.org X-Gm-Message-State: AOJu0YymtHwKfYQQiZmI0EUERJl39xs7DuaAnyebTpYWEtrZFeuq64/D Z2rfVwYo6BF548Pr0kgPMHfwGRVWly6qKJNtKUqdPtyEOARzYxI7h6AjyFIjdmn/vQ== X-Gm-Gg: AR+sD11Gy9kZ6d1psMEcSHf0BDdMZ3CGomZr49+EEqfW/LlUU8I+4wVrC7s4ndGMjY0 zhYto3IrX5E9IrnO36H0QuGaXyHq7uP3tTVWUX0ExDBb+mK20bmfismXtW+fDEfa03Wlmxb2Hci /kcAYZICi2N8VzHOeATNMh4ImAfek3MiIuM0JKvXnRQJJ3tOrwTiqmimQXXVtQDt45/Q9do1zN7 OTCMxw0KUC1Eahe1SkbLCI7wa8c3mm23fwuKuO74mAtwfjgGoCEFX2AAk87Efo1rBumbyVOul4l VrgFUJiiWXMAWJh5LGcJTF4243vJylRWgek7QeiqXd8oOkpZM0tzgsaFYTLXX2DOh5DG+yif8zH KCQOifUiQCwX+0UAxWJqzxnZYhY3JnO9YNZMRqSMCUc+WUP6YoU4xH4Rcaq+ITrpF5LlwlD1vVS WVUQ1C8YEJk6+DmmSKSW7anPf78DgXNmNWFoj5Wiyw3ti1DMy+VbpH2XaeMMPHs3pgcxDfbg== X-Received: by 2002:a05:6a21:4e02:b0:3c3:a722:59cc with SMTP id adf61e73a8af0-3c92a53edccmr4024344637.22.1785601675338; Sat, 01 Aug 2026 09:27:55 -0700 (PDT) Received: from ?IPV6:2804:14d:5c54:4d67::2000? ([2804:14d:5c54:4d67::2000]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3153dd4e5c7sm21682784eec.5.2026.08.01.09.27.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Aug 2026 09:27:54 -0700 (PDT) Message-ID: <7a0d6b21-a10d-4310-9202-4262bb50c354@mojatatu.com> Date: Sat, 1 Aug 2026 13:27:50 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v2 1/2] net/sched: reject overly deep qdisc hierarchies To: Ren Wei , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, jhs@mojatatu.com, jiri@resnulli.us, vega@nebusec.ai, milkory@outlook.com References: <1e9ab39597423fd5d13cfaaf52279b8ee3d9fc3c.1785434373.git.milkory@outlook.com> Content-Language: en-US From: Victor Nogueira In-Reply-To: <1e9ab39597423fd5d13cfaaf52279b8ee3d9fc3c.1785434373.git.milkory@outlook.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 01/08/2026 10:42, Ren Wei wrote: > From: Zijie Huang > > Deep qdisc hierarchies can lead to excessive recursion in qdisc tree > walkers and exhaust the kernel stack. The existing loop check does not > cover the create-and-graft path, so a hierarchy can still be extended by > creating a new child qdisc below an already deep parent. > > Store the hierarchy depth in struct Qdisc and update it when qdiscs are > grafted. Reject new child qdiscs once the parent is already at the maximum > allowed depth. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Cc: stable@vger.kernel.org > Reported-by: Vega > Assisted-by: Codex:gpt-5.4 > Signed-off-by: Zijie Huang > Signed-off-by: Ren Wei Reviewed-by: Victor Nogueira