Re: [PATCH] macvlan: fix oops with vlan-on-top and HW_VLAN_CTAG_TX lowerdev
From: Florian Westphal <fw@strlen.de>
Date: 2014-01-03 11:39:07
From: Florian Westphal <fw@strlen.de>
Date: 2014-01-03 11:39:07
David Miller [off-list ref] wrote:
vlan: Fix header ops passthru when doing TX VLAN offload. When the vlan code detects that the real device can do TX VLAN offloads in hardware, it tries to arrange for the real device's header_ops to be invoked directly.
Sorry for the late reply.
+static inline int dev_rebuild_header(struct sk_buff *skb)
+{
+ const struct net_device *dev = skb->dev;
+
+ if (!dev->header_ops || !dev->header_ops->rebuild)
+ return 0;
+ return dev->header_ops->rebuild(skb);
+}
+[..]
+static const struct header_ops vlan_passthru_header_ops = {
+ .create = vlan_passthru_hard_header,
+ .rebuild = dev_rebuild_header,Doesn't that result in infinite recursion when invoking dev_rebuild_header() on skb whose dev->header_ops is vlan_passthru_header_ops?