]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
igb: only use vlan_gro_receive if vlans are registered
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 23 Mar 2010 18:35:18 +0000 (18:35 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:44:29 +0000 (12:44 -0700)
commit 31b24b955c3ebbb6f3008a6374e61cf7c05a193c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/igb/igb_main.c

index c881347cb26dfc1117dee51506e0e1104593a4b1..01c3885de3fcb33ff4d6b6176e24d39ed92dee50 100644 (file)
@@ -5010,7 +5010,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