Skip to content

net/sched: Fix race conditions in mini_qdisc_pair_swap()

Peilin Ye lkml netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscsnet/sched/sch_api.c+10 -100 repliesApplied
2/2net/sched: qdisc_destroy() old ingress and clsact Qdiscs before graftinginclude/net/sch_generic.h net/sched/sch_api.c net/sched/sch_generic.c+42 -83 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPedro TammelaJamal Hadi SalimVlad Buslov
1/2T-b A-b R-b R-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH net 0/2] net/sched: Fix race conditions in mini_qdisc_pair_swap()

Hi all,

These 2 patches fix race conditions for ingress and clsact Qdiscs as reported [1] by syzbot, split out from another [2] series (last 2 patches of it). Per-patch changelog omitted.

Patch 1 hasn't been touched since last version; I just included everybody's tag.

Patch 2 bases on patch 6 v1 of [2], with comments and commit log slightly changed. We also need rtnl_dereference() to load ->qdisc_sleeping since commit d636fc5dd692 ("net: sched: add rcu annotations around qdisc->qdisc_sleeping"), so I changed that; please take yet another look, thanks!

Patch 2 has been tested with the new reproducer Pedro posted [3].

[1] https://syzkaller.appspot.com/bug?extid=b53a9c0d1ea4ad62da8b
[2] https://lore.kernel.org/r/[email protected]/
[3] https://lore.kernel.org/r/[email protected]/

Thanks,
Peilin Ye (2):
net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs net/sched: qdisc_destroy() old ingress and clsact Qdiscs before
grafting

 include/net/sch_generic.h |  8 +++++++
 net/sched/sch_api.c       | 44 +++++++++++++++++++++++++++------------
 net/sched/sch_generic.c   | 14 ++++++++++---
 3 files changed, 50 insertions(+), 16 deletions(-)
Signature · 1 line
2.20.1