netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] igb: only use vlan_gro_receive if vlans are registered
@ 2010-03-24  4:35 Jeff Kirsher
  2010-03-24  5:50 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2010-03-24  4:35 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

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.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index e72760c..01c65c7 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] igb: only use vlan_gro_receive if vlans are registered
  2010-03-24  4:35 [PATCH] igb: only use vlan_gro_receive if vlans are registered Jeff Kirsher
@ 2010-03-24  5:50 ` Eric Dumazet
  2010-03-24  6:21   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2010-03-24  5:50 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, netdev, gospo, Alexander Duyck

Le mardi 23 mars 2010 à 21:35 -0700, Jeff Kirsher a écrit :
> From: Alexander Duyck <alexander.h.duyck@intel.com>
> 
> 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

> 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>

>  drivers/net/igb/igb_main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
> index e72760c..01c65c7 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
> 
> --




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] igb: only use vlan_gro_receive if vlans are registered
  2010-03-24  5:50 ` Eric Dumazet
@ 2010-03-24  6:21   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-03-24  6:21 UTC (permalink / raw)
  To: eric.dumazet; +Cc: jeffrey.t.kirsher, netdev, gospo, alexander.h.duyck

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 24 Mar 2010 06:50:37 +0100

> Le mardi 23 mars 2010 à 21:35 -0700, Jeff Kirsher a écrit :
>> From: Alexander Duyck <alexander.h.duyck@intel.com>
>> 
>> 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.

>> 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>

Applied, thanks everyone.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-24  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24  4:35 [PATCH] igb: only use vlan_gro_receive if vlans are registered Jeff Kirsher
2010-03-24  5:50 ` Eric Dumazet
2010-03-24  6:21   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).