]> git.baikalelectronics.ru Git - kernel.git/commit
sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb
authorToke Høiland-Jørgensen <toke@toke.dk>
Wed, 31 Aug 2022 09:21:03 +0000 (11:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 31 Aug 2022 21:20:08 +0000 (14:20 -0700)
commitf357f549d0df28a0a08d04d6c2a61538024c5038
tree2a06d39adc366c6971756b45b181a2a019c6cb9a
parent9af8718aa3e25d294fe7adcd12d2911dfd991405
sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb

When the GSO splitting feature of sch_cake is enabled, GSO superpackets
will be broken up and the resulting segments enqueued in place of the
original skb. In this case, CAKE calls consume_skb() on the original skb,
but still returns NET_XMIT_SUCCESS. This can confuse parent qdiscs into
assuming the original skb still exists, when it really has been freed. Fix
this by adding the __NET_XMIT_STOLEN flag to the return value in this case.

Fixes: 868a627f3168 ("sch_cake: Conditionally split GSO segments")
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18231
Link: https://lore.kernel.org/r/20220831092103.442868-1-toke@toke.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/sch_cake.c