kernel: allow __netdev_alloc_skb_ip_align to be called with dev = NULL
authorFelix Fietkau <nbd@openwrt.org>
Tue, 13 Aug 2013 23:00:30 +0000 (23:00 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 13 Aug 2013 23:00:30 +0000 (23:00 +0000)
Backport of r36378

SVN-Revision: 37768

target/linux/generic/patches-3.3/721-phy_packets.patch

index 575fbaeaade9d170ed33b259512af85826c11656..cdb01be10029487cb5b578307c43b7f6a99bc377 100644 (file)
 +      struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
 +
 +#ifdef CONFIG_ETHERNET_PACKET_MANGLE
-+      if (dev->priv_flags & IFF_NO_IP_ALIGN)
++      if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
 +              return skb;
 +#endif
 +