From: Felix Fietkau Date: Mon, 22 Apr 2013 15:01:36 +0000 (+0000) Subject: kernel: allow __netdev_alloc_skb_ip_align to be called with dev = NULL X-Git-Tag: reboot~10630 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a8a01b42ae36ce4d04b73802b2b8a347d3ee6ac3;p=openwrt%2Fstaging%2Fjogo.git kernel: allow __netdev_alloc_skb_ip_align to be called with dev = NULL SVN-Revision: 36378 --- diff --git a/target/linux/generic/patches-3.3/721-phy_packets.patch b/target/linux/generic/patches-3.3/721-phy_packets.patch index 575fbaeaad..cdb01be100 100644 --- a/target/linux/generic/patches-3.3/721-phy_packets.patch +++ b/target/linux/generic/patches-3.3/721-phy_packets.patch @@ -145,7 +145,7 @@ + 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 + diff --git a/target/linux/generic/patches-3.6/721-phy_packets.patch b/target/linux/generic/patches-3.6/721-phy_packets.patch index 3a0fdc95b3..70b65a86bd 100644 --- a/target/linux/generic/patches-3.6/721-phy_packets.patch +++ b/target/linux/generic/patches-3.6/721-phy_packets.patch @@ -145,7 +145,7 @@ + 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 + diff --git a/target/linux/generic/patches-3.7/721-phy_packets.patch b/target/linux/generic/patches-3.7/721-phy_packets.patch index b8c15fcc6c..78b2d69b47 100644 --- a/target/linux/generic/patches-3.7/721-phy_packets.patch +++ b/target/linux/generic/patches-3.7/721-phy_packets.patch @@ -145,7 +145,7 @@ + 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 + diff --git a/target/linux/generic/patches-3.8/721-phy_packets.patch b/target/linux/generic/patches-3.8/721-phy_packets.patch index d78ba8ed60..88b5969f39 100644 --- a/target/linux/generic/patches-3.8/721-phy_packets.patch +++ b/target/linux/generic/patches-3.8/721-phy_packets.patch @@ -145,7 +145,7 @@ + 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 + diff --git a/target/linux/generic/patches-3.9/721-phy_packets.patch b/target/linux/generic/patches-3.9/721-phy_packets.patch index 65f5ffd213..dbf105e74c 100644 --- a/target/linux/generic/patches-3.9/721-phy_packets.patch +++ b/target/linux/generic/patches-3.9/721-phy_packets.patch @@ -145,7 +145,7 @@ + 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 +