Re: [PATCH net v2 1/2] net/sched: reject overly deep qdisc hierarchies
From: Victor Nogueira
Date: Sat Aug 01 2026 - 12:28:06 EST
On 01/08/2026 10:42, Ren Wei wrote:
From: Zijie Huang <milkory@xxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
Reported-by: Vega <vega@xxxxxxxxxx>
Assisted-by: Codex:gpt-5.4
Signed-off-by: Zijie Huang <milkory@xxxxxxxxxxx>
Signed-off-by: Ren Wei <enjou1224z@xxxxxxxxx>
Reviewed-by: Victor Nogueira <victor@xxxxxxxxxxxx>