Thread (26 messages) flat view 26 messages, 4 authors, 2026-03-25

RE: [PATCH v2 net-next 09/14] net: dsa: add NETC switch tag support

From: Wei Fang <wei.fang@nxp.com>
Date: 2026-03-25 01:54:27
Also in: imx, linux-arm-kernel, linux-devicetree, lkml, netdev

quoted
+static struct sk_buff *netc_rcv(struct sk_buff *skb,
+				struct net_device *ndev)
+{
+	struct netc_tag_cmn *tag_cmn = dsa_etype_header_pos_rx(skb);
+	int tag_len = netc_get_rx_tag_len(tag_cmn->type);
                                             ^^^^^^^^^^^^

Is the tag header guaranteed to be in the linear region of the skb?
Looking at other EtherType-based DSA tag drivers (tag_ar9331, tag_lan9303,
tag_dsa, tag_edsa, tag_a5psw, tag_brcm_legacy, tag_mxl-gsw1xx,
tag_gswip, and tag_mtk), they all call pskb_may_pull() before accessing
tag data to ensure the header is linearized.
I will add this check, thanks

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help