summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2010-03-23 18:35:18 +0000
committerDavid S. Miller <davem@davemloft.net>2010-03-23 23:19:57 -0700
commit31b24b955c3ebbb6f3008a6374e61cf7c05a193c (patch)
tree51f3c5cfac926d7919679a4e6cb5eac194b16b16 /drivers/net
parentd07f3e375f608e52a1f8958fbde105bb27b7629a (diff)
downloadlinux-3.10-31b24b955c3ebbb6f3008a6374e61cf7c05a193c.tar.gz
linux-3.10-31b24b955c3ebbb6f3008a6374e61cf7c05a193c.tar.bz2
linux-3.10-31b24b955c3ebbb6f3008a6374e61cf7c05a193c.zip
igb: only use vlan_gro_receive if vlans are registered
This change makes it so that vlan_gro_receive is only used if vlans have been registered to the adapter structure. Previously we were just sending all vlan tagged frames in via this function but this results in a null pointer dereference when vlans are not registered. [ This fixes bugzilla entry 15582 -Eric Dumazet] Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/igb/igb_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index e72760c2448..01c65c7447e 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -5102,7 +5102,7 @@ static void igb_receive_skb(struct igb_q_vector *q_vector,
{
struct igb_adapter *adapter = q_vector->adapter;
- if (vlan_tag)
+ if (vlan_tag && adapter->vlgrp)
vlan_gro_receive(&q_vector->napi, adapter->vlgrp,
vlan_tag, skb);
else