Patchwork FEC: Fix kernel panic in fec_set_mac_address.

login
register
mail settings
Submitter Mattias Walstrom
Date May 4, 2010, 2:16 p.m.
Message ID <4BE02C3E.2000705@vmlinux.org>
Download mbox | patch
Permalink /patch/51613/
State Accepted
Delegated to: David Miller
Headers show

Comments

Mattias Walstrom - May 4, 2010, 2:16 p.m.
Fix memory corruption that sometimes result in kernel panic.

Signed-off-by: Mattias Walström <mattias@vmlinux.org>

fec.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)




--
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
David Miller - May 5, 2010, 7:55 a.m.
From: Mattias Walstrom <mattias@vmlinux.org>
Date: Tue, 04 May 2010 16:16:30 +0200

> Fix memory corruption that sometimes result in kernel panic.
> 
> Signed-off-by: Mattias Walström <mattias@vmlinux.org>

Applied, thank you.
--
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 --git a/drivers/net/fec.c b/drivers/net/fec.c
index 9f98c1c..9b4e8f7 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1653,7 +1653,7 @@  fec_set_mac_address(struct net_device *dev, void *p)
 		(dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24),
 		fep->hwp + FEC_ADDR_LOW);
 	writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24),
-		fep + FEC_ADDR_HIGH);
+		fep->hwp + FEC_ADDR_HIGH);
 	return 0;
 }