Commit dbda9ff1 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Lipeng Sang
Browse files

net: sched: delete duplicate cleanup of backlog and qlen

stable inclusion
from stable-v5.10.152
commit 305aa36b628e2c7974fb23674a56b28b7224c2c2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=305aa36b628e2c7974fb23674a56b28b7224c2c2



--------------------------------

[ Upstream commit c19d893f ]

qdisc_reset() is clearing qdisc->q.qlen and qdisc->qstats.backlog
_after_ calling qdisc->ops->reset. There is no need to clear them
again in the specific reset function.

Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20220824005231.345727-1-shaozhengchao@huawei.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Stable-dep-of: 2a3fc782 ("net: sched: sfb: fix null pointer access issue when sfb_init() fails")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent bbc54858
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1186,7 +1186,6 @@ static inline void __qdisc_reset_queue(struct qdisc_skb_head *qh)
static inline void qdisc_reset_queue(struct Qdisc *sch)
{
	__qdisc_reset_queue(&sch->q);
	sch->qstats.backlog = 0;
}

static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new,
+0 −1
Original line number Diff line number Diff line
@@ -578,7 +578,6 @@ static void atm_tc_reset(struct Qdisc *sch)
	pr_debug("atm_tc_reset(sch %p,[qdisc %p])\n", sch, p);
	list_for_each_entry(flow, &p->flows, list)
		qdisc_reset(flow->q);
	sch->q.qlen = 0;
}

static void atm_tc_destroy(struct Qdisc *sch)
+0 −1
Original line number Diff line number Diff line
@@ -1053,7 +1053,6 @@ cbq_reset(struct Qdisc *sch)
			cl->cpriority = cl->priority;
		}
	}
	sch->q.qlen = 0;
}


+0 −2
Original line number Diff line number Diff line
@@ -315,8 +315,6 @@ static void choke_reset(struct Qdisc *sch)
		rtnl_qdisc_drop(skb, sch);
	}

	sch->q.qlen = 0;
	sch->qstats.backlog = 0;
	if (q->tab)
		memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *));
	q->head = q->tail = 0;
+0 −2
Original line number Diff line number Diff line
@@ -443,8 +443,6 @@ static void drr_reset_qdisc(struct Qdisc *sch)
			qdisc_reset(cl->qdisc);
		}
	}
	sch->qstats.backlog = 0;
	sch->q.qlen = 0;
}

static void drr_destroy_qdisc(struct Qdisc *sch)
Loading