Skip to content

Commit bec161a

Browse files
TaeheeYookuba-moo
authored andcommitted
amt: do not use overwrapped cb area
amt driver uses skb->cb for storing tunnel information. This job is worked before TC layer and then amt driver load tunnel info from skb->cb after TC layer. So, its cb area should not be overwrapped with CB area used by TC. In order to not use cb area used by TC, it skips the biggest cb structure used by TC, which was qdisc_skb_cb. But it's not anymore. Currently, biggest structure of TC's CB is tc_skb_cb. So, it should skip size of tc_skb_cb instead of qdisc_skb_cb. Fixes: ec624fe ("net/sched: Extend qdisc control block with tc control block") Signed-off-by: Taehee Yoo <ap420073@gmail.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20240107144241.4169520-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 66cee75 commit bec161a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/net/amt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <linux/net.h>
1212
#include <linux/igmp.h>
1313
#include <linux/workqueue.h>
14-
#include <net/sch_generic.h>
14+
#include <net/pkt_sched.h>
1515
#include <net/net_namespace.h>
1616
#include <net/ip.h>
1717
#include <net/udp.h>
@@ -80,11 +80,11 @@ static struct mld2_grec mldv2_zero_grec;
8080

8181
static struct amt_skb_cb *amt_skb_cb(struct sk_buff *skb)
8282
{
83-
BUILD_BUG_ON(sizeof(struct amt_skb_cb) + sizeof(struct qdisc_skb_cb) >
83+
BUILD_BUG_ON(sizeof(struct amt_skb_cb) + sizeof(struct tc_skb_cb) >
8484
sizeof_field(struct sk_buff, cb));
8585

8686
return (struct amt_skb_cb *)((void *)skb->cb +
87-
sizeof(struct qdisc_skb_cb));
87+
sizeof(struct tc_skb_cb));
8888
}
8989

9090
static void __amt_source_gc_work(void)

0 commit comments

Comments
 (0)