Message ID | 20210201200049.299153-1-ovov@yandex-team.ru |
---|---|
State | New |
Headers | show |
Series | [net] net: sched: replaced invalid qdisc tree flush helper in qdisc_replace | expand |
On Mon, 1 Feb 2021 23:00:49 +0300 Alexander Ovechkin wrote: > Commit e5f0e8f8e456 ("net: sched: introduce and use qdisc tree flush/purge helpers") > introduced qdisc tree flush/purge helpers, but erroneously used flush helper > instead of purge helper in qdisc_replace function. > This issue was found in our CI, that tests various qdisc setups by configuring > qdisc and sending data through it. Call of invalid helper sporadically leads > to corruption of vt_tree/cf_tree of hfsc_class that causes kernel oops: > Fixes: e5f0e8f8e456 ("net: sched: introduce and use qdisc tree flush/purge helpers") > Signed-off-by: Alexander Ovechkin <ovov@yandex-team.ru> > Reported-by: Alexander Kuznetsov <wwfq@yandex-team.ru> > Acked-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru> > Acked-by: Dmitry Yakunin <zeil@yandex-team.ru> > Acked-by: Cong Wang <xiyou.wangcong@gmail.com> No need to repost just to add the ack, patchwork will pick the tags up automatically. Applied, thanks!
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 3d03756e1069..b2ceec7b280d 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -1158,7 +1158,7 @@ static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new, old = *pold; *pold = new; if (old != NULL) - qdisc_tree_flush_backlog(old); + qdisc_purge_queue(old); sch_tree_unlock(sch); return old;