igb: only use vlan_gro_receive if vlans are registered
Subsystems (2)
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
@@ -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
Quoted 7 lines · Jeff Kirsher
From: Alexander Duyck <[email protected]>
This change makes it so that
vlan_gro_receiveis 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
Signed-off-by Alexander Duyck <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>---
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@@ -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 --
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_receiveis 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
Signed-off-by Alexander Duyck <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>---
...
Quoted 1 line
Acked-by Eric Dumazet <[email protected]>
Applied, thanks everyone.