public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tlan: Fix two regressions introduced by 64bit conversion.
@ 2008-08-09 16:54 Robert Fitzsimons
  2008-08-14  8:29 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Fitzsimons @ 2008-08-09 16:54 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Jeff Garzik, David Miller, Samuel Chessman, linux-kernel

Two regressions were introduced by the recent tlan: 64bit conversion
commit (93e16847c9db0093065c98063cfc639cdfccf19a).  The first in
TLan_GetSKB caused a NULL pointer dereference.  With the second causing
the link to fail to come up.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
 drivers/net/tlan.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 85246ed..ec871f6 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -360,8 +360,8 @@ TLan_GetSKB( const struct tlan_list_tag *tag)
 {
 	unsigned long addr;
 
-	addr = tag->buffer[8].address;
-	addr |= (tag->buffer[9].address << 16) << 16;
+	addr = tag->buffer[9].address;
+	addr |= (tag->buffer[8].address << 16) << 16;
 	return (struct sk_buff *) addr;
 }
 
@@ -1984,7 +1984,6 @@ static void TLan_ResetLists( struct net_device *dev )
 	TLanList	*list;
 	dma_addr_t	list_phys;
 	struct sk_buff	*skb;
-	void		*t = NULL;
 
 	priv->txHead = 0;
 	priv->txTail = 0;
@@ -2022,7 +2021,8 @@ static void TLan_ResetLists( struct net_device *dev )
 			}
 
 			skb_reserve( skb, NET_IP_ALIGN );
-			list->buffer[0].address = pci_map_single(priv->pciDev, t,
+			list->buffer[0].address = pci_map_single(priv->pciDev,
+								 skb->data,
 								 TLAN_MAX_FRAME_SIZE,
 								 PCI_DMA_FROMDEVICE);
 			TLan_StoreSKB(list, skb);
-- 
1.5.6.3


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

* Re: [PATCH] tlan: Fix two regressions introduced by 64bit conversion.
  2008-08-09 16:54 [PATCH] tlan: Fix two regressions introduced by 64bit conversion Robert Fitzsimons
@ 2008-08-14  8:29 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-08-14  8:29 UTC (permalink / raw)
  To: Robert Fitzsimons
  Cc: Stephen Hemminger, Jeff Garzik, David Miller, Samuel Chessman,
	linux-kernel

Robert Fitzsimons wrote:
> Two regressions were introduced by the recent tlan: 64bit conversion
> commit (93e16847c9db0093065c98063cfc639cdfccf19a).  The first in
> TLan_GetSKB caused a NULL pointer dereference.  With the second causing
> the link to fail to come up.
> 
> Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
> ---
>  drivers/net/tlan.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
> index 85246ed..ec871f6 100644
> --- a/drivers/net/tlan.c
> +++ b/drivers/net/tlan.c
> @@ -360,8 +360,8 @@ TLan_GetSKB( const struct tlan_list_tag *tag)
>  {
>  	unsigned long addr;
>  
> -	addr = tag->buffer[8].address;
> -	addr |= (tag->buffer[9].address << 16) << 16;
> +	addr = tag->buffer[9].address;
> +	addr |= (tag->buffer[8].address << 16) << 16;
>  	return (struct sk_buff *) addr;
>  }
>  
> @@ -1984,7 +1984,6 @@ static void TLan_ResetLists( struct net_device *dev )
>  	TLanList	*list;
>  	dma_addr_t	list_phys;
>  	struct sk_buff	*skb;
> -	void		*t = NULL;
>  
>  	priv->txHead = 0;
>  	priv->txTail = 0;
> @@ -2022,7 +2021,8 @@ static void TLan_ResetLists( struct net_device *dev )
>  			}
>  
>  			skb_reserve( skb, NET_IP_ALIGN );
> -			list->buffer[0].address = pci_map_single(priv->pciDev, t,
> +			list->buffer[0].address = pci_map_single(priv->pciDev,

applied



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

end of thread, other threads:[~2008-08-14  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-09 16:54 [PATCH] tlan: Fix two regressions introduced by 64bit conversion Robert Fitzsimons
2008-08-14  8:29 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox