aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/bcma/ssh:/git@git.zx2c4.com/git:
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2026-05-25 08:25:51 -0400
committerPaolo Abeni <pabeni@redhat.com>2026-05-28 12:26:36 +0200
commit9552b11e3edabc97cfcd9f29103d5afbce7ae183 (patch)
tree37acf6f3c7c023cb7c073bd0b40677227e527e30 /include/linux/bcma/ssh:/git@git.zx2c4.com/git:
parentRevert "selftests/tc-testing: Add tests for restrictions on netem duplication" (diff)
net/sched: fix packet loop on netem when duplicate is on
When netem duplicates a packet it re-enqueues the copy at the root qdisc. If another netem sits in the tree the copy can be duplicated again, recursing until the stack or memory is exhausted. The original duplication guard temporarily zeroed q->duplicate around the re-enqueue, but that does not cover all cases because it is per-qdisc state shared across all concurrent enqueue paths and is not safe without additional locking. Use the skb tc_depth field introduced in an earlier patch: - increment it on the duplicate before re-enqueue - skip duplication for any skb whose tc_depth is already non-zero. This marks the packet itself rather than mutating qdisc state, therefore it is safe regardless of tree topology or concurrency. Fixes: 0afb51e72855 ("[PKT_SCHED]: netem: reinsert for duplication") Reported-by: William Liu <will@willsroot.io> Reported-by: Savino Dicanosa <savy@syst3mfailure.io> Closes: https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigR_eIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis_0G7VEk=@willsroot.io/ Co-developed-by: Victor Nogueira <victor@mojatatu.com> Signed-off-by: Victor Nogueira <victor@mojatatu.com> Reviewed-by: William Liu <will@willsroot.io> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20260525122556.973584-5-jhs@mojatatu.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/bcma/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions