]> git.baikalelectronics.ru Git - kernel.git/commit
sch_sfb: Also store skb len before calling child enqueue
authorToke Høiland-Jørgensen <toke@toke.dk>
Mon, 5 Sep 2022 19:21:36 +0000 (21:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:04:56 +0000 (12:04 +0200)
commit47c36ad4982ceb9f59c868c56de48af50b7a9430
treef1c9cb22100f01a54bb984f75b956871294f969e
parent239993ab6f9d4f7f59a7e74ac77383aca751ab74
sch_sfb: Also store skb len before calling child enqueue

[ Upstream commit f3b6138bca9fe1d4b21af3b340ef8e25e13cfc93 ]

Cong Wang noticed that the previous fix for sch_sfb accessing the queued
skb after enqueueing it to a child qdisc was incomplete: the SFB enqueue
function was also calling qdisc_qstats_backlog_inc() after enqueue, which
reads the pkt len from the skb cb field. Fix this by also storing the skb
len, and using the stored value to increment the backlog after enqueueing.

Fixes: d7235a8ffcb9 ("sch_sfb: Don't assume the skb is still around after enqueueing to child")
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Acked-by: Cong Wang <cong.wang@bytedance.com>
Link: https://lore.kernel.org/r/20220905192137.965549-1-toke@toke.dk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_sfb.c