summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid Stevens <dlstevens@us.ibm.com>2014-03-18 17:32:29 +0100
committerDavid S. Miller <davem@davemloft.net>2014-03-18 21:09:34 +0100
commit7346135dcd3f9b57f30a5512094848c678d7143e (patch)
treecf35ba8995ebf569b57b15056f76eb20c1b4ad12 /drivers/net
parentMerge branch 'cnic-net' (diff)
downloadlinux-7346135dcd3f9b57f30a5512094848c678d7143e.tar.xz
linux-7346135dcd3f9b57f30a5512094848c678d7143e.zip
vxlan: fix potential NULL dereference in arp_reduce()
This patch fixes a NULL pointer dereference in the event of an skb allocation failure in arp_reduce(). Signed-Off-By: David L Stevens <dlstevens@us.ibm.com> Acked-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/vxlan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index b0f705c2378f..a7eb3f28db6c 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1318,6 +1318,9 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb)
neigh_release(n);
+ if (reply == NULL)
+ goto out;
+
skb_reset_mac_header(reply);
__skb_pull(reply, skb_network_offset(reply));
reply->ip_summed = CHECKSUM_UNNECESSARY;