Patchwork [net-next-2.6,4/9] vxge: Fixed crash in PAE system due to wrong typecasting.

login
register
mail settings
Submitter Sreenivasa Honnur
Date Oct. 5, 2009, 9:09 a.m.
Message ID <Pine.GSO.4.10.10910050508570.2346-100000@guinness>
Download mbox | patch
Permalink /patch/34954/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Sreenivasa Honnur - Oct. 5, 2009, 9:09 a.m.
- Fix a crash in PAE system due to wrong typecasting.

- On PAE system size_t is unsigned int which is 32bit. Avoid casting
  64 bit address to 32 bit

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -urpN patch3/drivers/net/vxge/vxge-traffic.c patch4/drivers/net/vxge/vxge-traffic.c
--- patch3/drivers/net/vxge/vxge-traffic.c	2009-09-04 01:19:23.000000000 -0700
+++ patch4/drivers/net/vxge/vxge-traffic.c	2009-09-04 01:22:35.000000000 -0700
@@ -1232,7 +1232,7 @@  void vxge_hw_fifo_txdl_post(struct __vxg
 	vxge_hw_channel_dtr_post(&fifo->channel, txdlh);
 
 	__vxge_hw_non_offload_db_post(fifo,
-		(u64)(size_t)txdl_priv->dma_addr,
+		(u64)txdl_priv->dma_addr,
 		txdl_priv->frags - 1,
 		fifo->no_snoop_bits);