diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 79b9c06c83adb26828ca9e8bd823a126b67c71d3..e2eaa1ff948d1f592131146ec478b963f2f5cc3d 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -442,7 +442,7 @@ bool __skb_flow_dissect(const struct sk_buff *skb, nhoff = skb_network_offset(skb); hlen = skb_headlen(skb); #if IS_ENABLED(CONFIG_NET_DSA) - if (unlikely(netdev_uses_dsa(skb->dev))) { + if (unlikely(skb->dev && netdev_uses_dsa(skb->dev))) { const struct dsa_device_ops *ops; int offset;