From: Alexander Duyck Date: Tue, 23 Mar 2010 18:35:18 +0000 (+0000) Subject: igb: only use vlan_gro_receive if vlans are registered X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31b24b955c3ebbb6f3008a6374e61cf7c05a193c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jeff Kirsher Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index e72760c2448b..01c65c7447e1 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