Skip to contentSkip to conversation

igb: only use vlan_gro_receive if vlans are registered

PATCH Applied Jeff Kirsher 3 participants 3 messages Mar 24, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb: only use vlan_gro_receive if vlans are registered

From: Alexander Duyck <[email protected]>

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.

---

 drivers/net/igb/igb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/igb/igb_main.c +1 -1
index e72760c..01c65c7 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jeff Kirsher

From: Alexander Duyck <[email protected]>

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 patch fixes bugzilla entry 15582

See http://bugzilla.kernel.org/show_bug.cgi?id=15582

Quoted 4 lines

---

Quoted 18 lines
 drivers/net/igb/igb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/igb/igb_main.c +1 -2
index e72760c..01c65c7 100644
@@ -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
 
--
maintainer Applied
#2 lore raw

From: Eric Dumazet <[email protected]>
Date: Wed, 24 Mar 2010 06:50:37 +0100

Quoted 10 lines · Jeff Kirsher
Quoted 7 lines

From: Alexander Duyck <[email protected]>

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 patch fixes bugzilla entry 15582

I've added a note about this to the commit message.

Quoted 3 lines
Quoted 3 lines

---

...

Quoted 1 line

Applied, thanks everyone.