aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/actions.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-10-20 12:55:07 -0400
committerMark Brown <broonie@kernel.org>2014-10-20 13:27:32 -0400
commitb7a40242c82cd73cfcea305f23e67d068dd8401a (patch)
tree251b49d19cd7c371847ae1f951e1b537ca0e1c15 /net/openvswitch/actions.c
parentd26833bfce5e56017bea9f1f50838f20e18e7b7e (diff)
parent9c6de47d53a3ce8df1642ae67823688eb98a190a (diff)
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Conflicts: drivers/spi/spi-dw-mid.c
Diffstat (limited to 'net/openvswitch/actions.c')
-rw-r--r--net/openvswitch/actions.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index fe5cda0deb39..5231652a95d9 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -42,6 +42,9 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
42 42
43static int make_writable(struct sk_buff *skb, int write_len) 43static int make_writable(struct sk_buff *skb, int write_len)
44{ 44{
45 if (!pskb_may_pull(skb, write_len))
46 return -ENOMEM;
47
45 if (!skb_cloned(skb) || skb_clone_writable(skb, write_len)) 48 if (!skb_cloned(skb) || skb_clone_writable(skb, write_len))
46 return 0; 49 return 0;
47 50
@@ -70,6 +73,8 @@ static int __pop_vlan_tci(struct sk_buff *skb, __be16 *current_tci)
70 73
71 vlan_set_encap_proto(skb, vhdr); 74 vlan_set_encap_proto(skb, vhdr);
72 skb->mac_header += VLAN_HLEN; 75 skb->mac_header += VLAN_HLEN;
76 if (skb_network_offset(skb) < ETH_HLEN)
77 skb_set_network_header(skb, ETH_HLEN);
73 skb_reset_mac_len(skb); 78 skb_reset_mac_len(skb);
74 79
75 return 0; 80 return 0;